Analogous to a timer, but timer only works in real time. Thank you!
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 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.Brandon H.NinjaTrader Customer Service
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.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,406 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
98 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
8 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
160 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
9 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment