chore: fix minor typos
This commit is contained in:
@@ -140,7 +140,7 @@ def _calc_drawdown_series(
|
|||||||
max_drawdown_df["drawdown_relative"] = (max_balance - cumulative_balance) / max_balance
|
max_drawdown_df["drawdown_relative"] = (max_balance - cumulative_balance) / max_balance
|
||||||
else:
|
else:
|
||||||
# NOTE: This is not completely accurate,
|
# NOTE: This is not completely accurate,
|
||||||
# but might good enough if starting_balance is not available
|
# but will be good enough if starting_balance is not available
|
||||||
max_drawdown_df["drawdown_relative"] = (
|
max_drawdown_df["drawdown_relative"] = (
|
||||||
max_drawdown_df["high_value"] - max_drawdown_df["cumulative"]
|
max_drawdown_df["high_value"] - max_drawdown_df["cumulative"]
|
||||||
) / max_drawdown_df["high_value"]
|
) / max_drawdown_df["high_value"]
|
||||||
|
|||||||
@@ -858,9 +858,9 @@ class LocalTrade:
|
|||||||
higher_stop = stop_loss_norm > self.stop_loss
|
higher_stop = stop_loss_norm > self.stop_loss
|
||||||
lower_stop = stop_loss_norm < self.stop_loss
|
lower_stop = stop_loss_norm < self.stop_loss
|
||||||
|
|
||||||
# stop losses only walk up, never down!,
|
# stop losses only walk up, never down!
|
||||||
# ? But adding more to a leveraged trade would create a lower liquidation price,
|
# but adding more to a leveraged trade would create a lower liquidation price,
|
||||||
# ? decreasing the minimum stoploss
|
# decreasing the minimum stoploss
|
||||||
if (
|
if (
|
||||||
allow_refresh
|
allow_refresh
|
||||||
or (higher_stop and not self.is_short)
|
or (higher_stop and not self.is_short)
|
||||||
|
|||||||
Reference in New Issue
Block a user