Skip to content

Commit

Permalink
исправлена ошибка в функции расчета относительной просадки calc_balan…
Browse files Browse the repository at this point in the history
…ce_drawdown_relative
  • Loading branch information
NewYaroslav committed Jan 8, 2020
1 parent d15e0c2 commit f53cc25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/easy_bo_common.hpp
Expand Up @@ -41,7 +41,7 @@ namespace easy_bo {
EASY_BO_LOSS = -1, ///< Убычтоный бинарный опцион
EASY_BO_NEUTRAL = 0,///< Бинарный опцон в ничью
};

/// Набор возможных состояний ошибки
enum {
OK = 0, ///< Ошибок нет, все в порядке
Expand Down Expand Up @@ -279,10 +279,11 @@ namespace easy_bo {
if(curve[i] > max_value) max_value = curve[i];
if(curve[i] < max_value) {
NUM_TYPE difference = max_value - curve[i];
difference /= (NUM_TYPE)max_value;
if(difference > max_difference) max_difference = difference;
}
}
return (T1)(max_difference / max_value);
return (T1)max_difference;
}
};

Expand Down

0 comments on commit f53cc25

Please sign in to comment.