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 geddyisodin, 04-25-2024, 05:20 AM
          8 responses
          60 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by jxs_xrj, 01-12-2020, 09:49 AM
          4 responses
          3,287 views
          1 like
          Last Post jgualdronc  
          Started by Option Whisperer, Today, 09:55 AM
          0 responses
          5 views
          0 likes
          Last Post Option Whisperer  
          Started by halgo_boulder, 04-20-2024, 08:44 AM
          2 responses
          22 views
          0 likes
          Last Post halgo_boulder  
          Started by mishhh, 05-25-2010, 08:54 AM
          19 responses
          6,189 views
          0 likes
          Last Post rene69851  
          Working...
          X