I wrote the code for it and testing using playback connection on /NQ 06-25.
I am printing the values to see if the conditions are being met.
on the close of the candle, es[0] is printing the es[1] ema value & es[1] is printing the es[2] ema value. Where as /nq ema's are printing for the right candles.
Why is this happening?
Sharing some screenshots:
This is one of my set in the strategy: ( when NQ ema-8[0] - 0.2 is greather than or equal to NQ ema-8[1], then print 1st condition satisfied, also print ES ema-8[0], ES ema-8[1] AND print NQ ema-8[0], NQ ema-8[1]
At close of 9:30 candle, 1st condition got executed, that means : NQ ema-8[0] - 0.2 is greater than or equal to NQ ema-8[1]. Which is good but when i printed the ES values, they are printing for EMA8[1] and EMA8[2]. I am not sure why this is happening.
Below data boxes will show the ema value of es 06-25 at 9:30, 9:29, 9:28 ( last row in each data box).
Comment