Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sync MarketData/Depth in AddOn with Indicators/Strategies

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

    Sync MarketData/Depth in AddOn with Indicators/Strategies

    I am working on functions that do some heavy lifting, highly CPU intensive. I tested the concept by attaching the class directly to indicators, but that forces duplicate calculation and slows the system down.

    So I created an "AddOn" type processor (Singleton really) which opens the desire instrument using:

    marketData = new MarketData(instrument);
    marketDepth = new MarketDepth<MarketDepthRow>(instrument);

    marketData.Update += OnMarketData;
    marketDepth.Update+= OnMarketDepth;


    This is because if I passed the Data/Depth from the indicators directly to the Singleton, it would get 4 copies if I have 4 indicators and I don't know ahead of time how many will be connected. This also avoids the need to add these OnEvents to each indicator.

    I got all this working fine, but what I am seeing is that the Data/Depth events do not happen at the same time. It seems like the AddOn's events are ASYNC to those of the indicators.

    How do I force the events to happen synchronously?

    I really need the processing to be in this sequence. In {} any order:
    {
    OnMarketData -> AddOn
    OnMarketData -> Indicator1
    OnMarketData -> Strategy1
    OnMarketData -> Indicator2
    OnMarketData -> Indicator3
    OnMarketData -> Strategy2
    }
    OnBarUpdate()

    Generally this happens if you are using just indicators, but seems like with this external subscription, the "AddOn" marketData/Depth seems to flow as it feels.

    #2
    Hello NJA_MC,

    Thank you for your post.

    I am not certain how you would force the sync. Do you have an example we could test of what you are trying to accomplish?

    Comment


      #3
      Patrick,

      I will see what I can put together. It will be confidential and private code so I will send it directly to PlatformSupport.

      Comment


        #4
        Patrick,

        I have sent the test scripts off to you for help in Synchronizing.

        Thanks,
        Greg

        Edit: Ticket #1389909

        Comment


          #5
          Patrick,

          Any luck syncing the AddOn with the Indicators? I know you probably got busy with the public release but just checking in on this issue. This would be a major CPU reduction if we can get this to work.

          Comment


            #6
            Hello NJA_MC,

            Thank you for your patience.

            As we discussed today over e-mail, I am still investigating this on my end. I appreciate your assistance with this item.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            672 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            379 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            111 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            575 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            582 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X