Forums ProRealTime English forum ProOrder support need help coding a new trailing stop loss Reply To: need help coding a new trailing stop loss

#69635

Thinking out loud, could it be a good idea to limit the code above to be the trailing stop ONLY when profit is > 10 but < 100. Then just copy paste the same code but then use THAT trailing stop loss when profit is > 100 but < 200?

Yeah that sounds good, try it and let us know please?

I also forked this code a while ago and had a different step for Longs and Shorts.
Nicolas and others may consider this even more curve fitting! 🙂 But from my observations, shorts in up trends behaves different than shorts in down trends (and vice versa) and so to have different  parameter values for shorts and longs can be beneficial (it can also be even more curve fitting! 🙂 ).

Anyway I’m rambling, re your question, instead of copying the whole code again (as you said) why not use something like …