Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order of Processing Of OnDataPoint()

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

    Order of Processing Of OnDataPoint()

    Hi,

    Does anyone know the order of processing of OnDataPoint() relative to OnStateChange()? The Guide states that the designed state management system for BarTypes is State.Active. So does OnDataPoint() take place after State.Configure and before State.Active, or after State.Active and before State.DataLoaded?

    #2
    Hello Zeos6,

    Thank you for the post.

    From testing a blank custom bar type, I find that the ordering is State.Configure, State.Active, then OnDataPoint begins to be called. I do not see a case where State.DataLoaded is reached, so State.DataLoaded is not considered in a custom bar type.

    I have attached my test script. Please let me know if I can assist further.
    Attached Files
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you ChrisL. That is helpful.

      I do, however, have a follow up question. If State.DataLoaded is never reached, how are historical bars processed. State.Historical comes after State.DataLoaded? Does NT simply skip State.DataLoaded and moves directly into State.Historical, State.Transition, and then State.RealTime?

      Comment


        #4
        Hello Zeos6,

        Thank you for the reply.

        BarsTypes do not have the same lifecycle as indicators or strategies. State.Active is when the bar type is active and working. Note that the Active state is different than data processing states.

        Please see this help guide page that describes OnStateChange states:


        Please let me know if I can assist further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thanks ChrisL.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Max238, Today, 01:28 AM
          5 responses
          39 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by giulyko00, Yesterday, 12:03 PM
          3 responses
          12 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by habeebft, Today, 07:27 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_ChristopherS  
          Started by AveryFlynn, Today, 04:57 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by r68cervera, Today, 05:29 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X