Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue when using multiple data series in a strategy builder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Issue when using multiple data series in a strategy builder

    Hi, i want to know if both ema[0], ema[1] on both es and nq are trending upward so that i can enter a trade on /nq chart.(that means i run the strategy on /nq chart but check if both /es & /nq are meeting the condition i specified)

    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]



    Click image for larger version

Name:	image.png
Views:	152
Size:	23.1 KB
ID:	1338416


    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.


    Click image for larger version

Name:	image.png
Views:	115
Size:	8.7 KB
ID:	1338417
    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).

    Click image for larger version

Name:	image.png
Views:	117
Size:	19.3 KB
ID:	1338418

    ​​​​​​​Click image for larger version

Name:	image.png
Views:	116
Size:	19.1 KB
ID:	1338419
    ​​​​​​​Click image for larger version

Name:	image.png
Views:	120
Size:	19.6 KB
ID:	1338420​​



    ​​

    #2
    Hello psangram,

    I believe you are just hitting the order of bar processing here. The EMA is a secondary series so you are getting the last closed bar price from the ES when the NQ bar closes. In realtime that could differ further because those are two unique instruments which will have different incoming data, the bars could close at different times depending on the volume of trades in each market.

    Comment


      #3
      Really?
      This is very interesting.
      if I run on a 1 min time frame, I thought all the instruments would close exactly at the 1 min.

      if what you said is true, how can I handle my situation then?

      how can I use multiple instruments in my strategy and design what I intended to?​

      Comment


        #4
        Hello psangram,

        The bars will show a close at specific time intervals but those are two different markets so in realtime they will have unique events. Only in historical processing will you see an exact sequence of event processing.

        From what I can tell you are already using the indicators how you want to. When the primary bar closes you are calculating the EMA for each series, whatever the last closed data was for that series would be used.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        128 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        65 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        117 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X