Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Generate periodic custom event during HISTORICAL state

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

    Generate periodic custom event during HISTORICAL state

    How to trigger an event that fires once per second during State.Historical, regardless of whether my primary or secondary one tick data series has a BarUpdate event?
    Analogous to a timer, but timer only works in real time. Thank you!

    #2
    Hello Ricam,

    Thanks for your post.

    We have received your inquiry and are currently looking into this matter.

    After we are finished investigating this inquiry we will update this forum thread.

    Thanks for your patience.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello Ricam,

      Thanks for your patience.

      After researching this matter we have found that this would not be possible to accomplish using a timer and we do not have any NinjaScript methods or properties available to accomplish this.

      You would need to have data at those intervals that the custom event is being triggered and State.Historical is run all at once.

      This forum thread will be open for other community members to share their insights on the topic.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        One drawback of this is that in slow markets there will be missing ticks in time based data. Not sure that this causes any actual problems.

        Comment


          #5
          Add another data series of bar type "1 second" and then use BarsInProgress == that to determine if 1 second has gone by? That would work except when there are no ticks at all during the second (and thus, no updates on ANY of your data series for that instrument) - since Historical blasts by as fast as possible and not in realtime, you would need to examine on the next update if it has been "too long" and then simulate that you got the 1-second event one or more times if, for instance, two adjacent ticks are an hour apart. If you do not care about simulating historical 1-second events when there are no trades, then you can skip this part entirely.
          Bruce DeVault
          QuantKey Trading Vendor Services
          NinjaTrader Ecosystem Vendor - QuantKey

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X