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.
Comment