You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use ATR as a stop-loss indicator and set the take-profit at a position where the profit-loss ratio is 2.0. After reading the documentation, I still don’t understand how to write the strategy and am seeking help for this.
Step 1: What indicators are required?
ATR(Average True Range)
Step 2: Explain the Buy Strategy
pass
Step 1: Explain the Sell Strategy
When executing a buy order, use the lower line of the ATR of the current K-line as the stop-loss position, and then set the take-profit position at a profit-loss ratio of 2.0. There are two methods, and I’m not sure if both can be implemented:
Place a stop-loss and take-profit order directly at the time of purchase.
Wait for the price to reach the target and then sell at market price or limit price.
Source
Sorry but there are no sources
The text was updated successfully, but these errors were encountered:
The problem is how to write exit, stop loss, and take profit.
I found populate_exit_trend is where populates the exit signal immediatly, so can not use this function to set the stop-loss and the take-profit.
Then I found custom_stoploss.
defcustom_stoploss(self, pair: str, trade: Trade, current_time: datetime,
current_rate: float, current_profit: float, after_fill: bool,
**kwargs) ->float|None:
dataframe, last_updated=self.dp.get_analyzed_dataframe(pair, self.timeframe)
# dataframe['atr_lower'].iat[-1]''' How can I obtain my actual purchase price and the percentage difference between the purchase price and the ATR lower band? '''
And I can't find afunction to set take-profit like custom_stoploss.
I want to use ATR as a stop-loss indicator and set the take-profit at a position where the profit-loss ratio is 2.0. After reading the documentation, I still don’t understand how to write the strategy and am seeking help for this.
Step 1: What indicators are required?
ATR(Average True Range)
Step 2: Explain the Buy Strategy
pass
Step 1: Explain the Sell Strategy
When executing a buy order, use the lower line of the ATR of the current K-line as the stop-loss position, and then set the take-profit position at a profit-loss ratio of 2.0. There are two methods, and I’m not sure if both can be implemented:
Place a stop-loss and take-profit order directly at the time of purchase.
Wait for the price to reach the target and then sell at market price or limit price.
Source
Sorry but there are no sources
The text was updated successfully, but these errors were encountered: