• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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, 06: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
          Ram by tonynt
          Started by tonynt, Today, 06:14 AM
          0 responses
          1 view
          0 likes
          Last Post tonynt
          by tonynt
           
          Started by pjsmith, Today, 04:10 AM
          0 responses
          3 views
          0 likes
          Last Post pjsmith
          by pjsmith
           
          Started by tonynt, Today, 02:21 AM
          0 responses
          8 views
          0 likes
          Last Post tonynt
          by tonynt
           
          Started by alstsion, Today, 12:55 AM
          0 responses
          2 views
          0 likes
          Last Post alstsion  
          Started by kandster, Yesterday, 11:49 PM
          0 responses
          3 views
          0 likes
          Last Post kandster  
          Working...
          X