Using a range chart set to range value of 4, I have 2 ema's - 50 ema (in yellow) & 150 ema (in red). I want to use the red line as my entry for long (and short), and I want to use the yellow line as my exit once the trade has been triggered. My entries are the same long or short: 2 complete bars (not touching the red line) +1 tick above (or below for short) to trigger long (short). Once triggered I want to have an OCO entry with profit target as 2 complete bars below the yellow line for longs & stop loss as 3 complete bars +1 tick below red for longs. I've attached a picture that shows both long & short entries.
I've also included the current code, which I know is messed up big time.
REDLINE CODE.txt
Any help would be appreciated. Thanks.

, but how can I tweak this to more closely match the picture I posted above in my initial posting?
I am totally at a loss to undertstand what you are showing here. You show me 3 charts, all of which do not have any strategy loaded. How can you expect trades to be taken, backtest or otherwise, if the strategy has not been applied to the chart? The one picture that has a strategy showing on it, does have a strategy applied that is very obviously not what I wrote, as there is not even a semblance of similarity to the Properties that I exposed in my code. What comment are you seeking on that? I cannot possibly know what is in that code, as I have never seen it.
Comment