Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can i only load the last X number of historical trades?
Collapse
X
-
Can i only load the last X number of historical trades?
My strategy uses ticks to set stop losses based on real times. But when i load the strategy it takes a long time to load all the historical trades, so that it can determine its strategy position. Is there a way to only load the last few historical trades just so the strategy can determine the current position? I know it is possible to turn off all historical trades.Tags: None
-
Hello sofortune,
Thanks for your post.
You could consider loading fewer days of data in the 'Days to load' property of the Data Series window if you would like the strategy to process less historical data.
For example, if you only want the strategy to process 1 day of historical data you could set the 'Days to load' property to 1 in the Data Series window.
See the 'How To Edit Data Series Parameters' section of this help guide page for more information: https://ninjatrader.com/support/help...price_data.htm
Otherwise, you could consider skipping historical processing in your strategy by adding if (State == State.Historical) return; to the top of your OnBarUpdate() logic.<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>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
133 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment