Is it the maximum bars lookback? Or the minimum bars required to trade?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Start Date of a Strategy?
Collapse
X
-
Hello pmmkm,
Thanks for your post.
Unless you have otherwise instructed the strategy through coding, the strategy will process historical bars starting at the very first bar of the historical data set as defined by the data series "days (or bars) to load". To clarify, if you have a data series of 5 days to load then the strategy will begin processing the data from 5 days ago.
In terms of when it places its first trade, the parameter "Bars required to trade" will prevent entries until that number of bars has been processed by the strategy.
If you do not wish the strategy to place historical trades you can add the following statement at the top of the OnBarUpdate():
if (State != State.Realtime) return; // Only process on real time data.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
41 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
28 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
45 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
37 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment