Hi!
I have some trailing stop code that I am trying to turn into a call function. Is this possible? I am running into difficulties I do not run into when just creating a call for a buy signal from an indicator.
Thank you for any insight, and let me know if the question needs clarification!
It is not simple andquite impractical to use an indicator to manage your trailing stop in a strategy.
You should communicate several parameters to the indicator:
- the trade is either long or short
- entry price
- Initial SL and TP
- final starting point
- final step
- last exit price calculated
- any other data required by the trailing stop code to make correct calculations
and it would return an updated exit price!
You’d rather embed the code into your strategy.
Thank you for the response!