Analogous to a timer, but timer only works in real time. Thank you!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Generate periodic custom event during HISTORICAL state
Collapse
X
-
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!Tags: None
-
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>
-
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
-
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.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment