Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Syncronizing between many instruments

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

    Syncronizing between many instruments

    Hi All,

    I'm working on a strategy that load many instruments(~100) and do some checking to enter a position on bar close in OnBarUpdate().
    I want to do the check only once so I have:
    Code:
     if (BarsInProgress != 0)
                    return;
    I know that NT is event driven so my issue is what happens if some of the instruments trades less frequent then the BarInProgress == 0 or vice versa, what data I'm referring to in the call for OnBarUpdate() when I'm using for example Closes[50][0]?

    I hope I made my question clear :-)
    Tx in advance!

    #2
    freewind, you're correct NT would be event driven - if you call Closes[50[0] on BIP1 context this would give you the last known value of the Close from this series, the last time it called the OnBarUpdate().

    Comment


      #3
      OK, and when I'm backtesting can I assume I get the data of the current bars for all of my instruments?

      Comment


        #4
        Correct, the [0] index would point towards the last known value of the array's context you're working with.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        47 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X