Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Defect with onBarUpdate

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

    Defect with onBarUpdate

    Title is bit misleading. The issue appears to be design related. When two strategies have same interval such as 1 tick, one gets called after another one completes like maybe in a loop inside a single thread. This poses an issue as in now they both move in lockstep so the faster strategy is stuck with the lowest common denominator and its onbarupdate falls behind waiting for other to complete. This should have never occurred. Correct design would have been to launch separate thread for each strategy and have no dependency whatsoever. Instead NT says whenever that interval such as 1 tick elapsed, let me call onBarUpdate of these two strategies one after another.

    #2
    This is in Playback-Market Replay?

    Is this new to NT8B10?

    Comment


      #3
      Hello,

      Thank you for the post.

      Could you provide the sample strategies you are currently using to check this along with all of the steps required for me to reproduce the scenario?

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment


        #4
        To sledge, this occurs in both live and replay. Former can be few minutes right off the bat and latter can be in hours if speed is increased.

        Jess, here is what I would do if I were you.
        1. Create a slow strategy A with say some pseudo code like this inside onBarUpdate or put sleep on it
        Print(Time[0]+Close[0]);
        Try
        {
        Task run (async =>
        {
        Var t = sendtoslowmsgqueasync(tickdata);
        Await t;
        }
        Task.wait();
        }
        Catch (objectdisposed)
        {
        }
        2. Create fast strategy B with following pseudo code in onBarUpdate
        Print(Time[0]+Close[0]);
        Sendtoadifferentfastmsgque(tickdata)
        3. Goto strategies tab and add these two strategies for 1 tick. Start and see both slow down but remain in lock step. B is now hobbled despite no delays. For instance if u are doing
        For (interval i= 1 tick)
        Call strategy A
        Call strategy B
        4. Now remove strategy A and add it back in for 1 second but keep B at 1 tick. You will see strategy B look alive and A as well since it wont have trouble completing in 1 sec. So the logic may look something like
        For 1 tick call B
        For 1 sec call A or all those that have same interval.
        5. I would talk to Josh and loop in Ray and Dierk. If Ray has a chat with developer, report back on the details.
        Last edited by tradejockey; 04-06-2016, 07:16 PM.

        Comment


          #5
          Hello,

          Thank you for the details.

          I could try to piece the strategies together by what is provided, but if you could just provide the actual samples that would be better to ensure I test exactly what you are to see the same result. For bug reports accuracy is key in finding the answer.

          I will attempt to test what is provided today, if I am unable to see the same result I will reply back. In the meantime if you could upload an exported sample from the platform that demonstrates this that would be much better.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mizzouman1, Today, 07:35 AM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by RubenCazorla, Today, 09:07 AM
          2 responses
          13 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by i019945nj, 12-14-2023, 06:41 AM
          7 responses
          82 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by timmbbo, 07-05-2023, 10:21 PM
          4 responses
          158 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by tkaboris, Today, 08:01 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X