Changed documentation based on review comments

Signed-off-by: hoeckxer <hawkeyenl@yahoo.com>
This commit is contained in:
hoeckxer 2021-01-04 14:37:22 +01:00
parent 0704cfb05b
commit 1cf6e2c957

View File

@ -142,16 +142,10 @@ class AwesomeStrategy(IStrategy):
return -1 # return a value bigger than the inital stoploss to keep using the inital stoploss return -1 # return a value bigger than the inital stoploss to keep using the inital stoploss
# After reaching the desired offset, allow the stoploss to trail by half the profit # After reaching the desired offset, allow the stoploss to trail by half the profit
stoploss = current_profit / 2 desired_stoploss = current_profit / 2
if abs(stoploss) < 0.025: # Use a minimum of 2.5% and a maximum of 5%
# Maintain a minimum of 2.5% trailing stoploss return max(min(desired_stoploss, 0.05), 0.025)
stoploss = 0.025
if abs(stoploss) > 0.05:
# Maximize the stoploss at 5%
stoploss = 0.05
return stoploss
``` ```
#### Absolute stoploss #### Absolute stoploss