I am looking for a way to have my stop loss for longs only set when the entry is for a long order and vice versa for shorts. The thing is that I need MarketPosition to be Flat, otherwise the stop moves on each new bar, same thing happens if I put the stop loss right above the line of code that specifies the entry. I would put Flat as a condition in each of my trades, but A. I'm not sure this would even prevent my stop from moving if it was in each one of my entries, and B. I need to be able to get out of a long and reverse to a short, so that's a no go. Any ideas?
If I've been unclear in any way, let me know and I'll provide more information/code snippets.
Thank you!
Comment