Skip to content

Commit

Permalink
docs: strategy-callbacks: revert leverage=trade.leverage removal
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJoeSchr authored Apr 19, 2023
1 parent f9124ef commit 94e190b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/strategy-callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ class AwesomeStrategy(IStrategy):

# evaluate highest to lowest, so that highest possible stop is used
if current_profit > 0.40:
return stoploss_from_open(0.25, current_profit, is_short=trade.is_short)
return stoploss_from_open(0.25, current_profit, is_short=trade.is_short, leverage=trade.leverage)
elif current_profit > 0.25:
return stoploss_from_open(0.15, current_profit, is_short=trade.is_short)
return stoploss_from_open(0.15, current_profit, is_short=trade.is_short, leverage=trade.leverage)
elif current_profit > 0.20:
return stoploss_from_open(0.07, current_profit, is_short=trade.is_short)
return stoploss_from_open(0.07, current_profit, is_short=trade.is_short, leverage=trade.leverage)

# return maximum stoploss value, keeping current stoploss price unchanged
return 1
Expand Down

0 comments on commit 94e190b

Please sign in to comment.