Is it the maximum bars lookback? Or the minimum bars required to trade?
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
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.Paul H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by trilliantrader, 04-18-2024, 08:16 AM
|
4 responses
18 views
0 likes
|
Last Post Today, 10:33 PM | ||
Started by mgco4you, Today, 09:46 PM
|
1 response
10 views
0 likes
|
Last Post Today, 09:56 PM | ||
Started by wzgy0920, Today, 09:53 PM
|
0 responses
10 views
0 likes
|
Last Post
by wzgy0920
Today, 09:53 PM
|
||
Started by Rapine Heihei, Today, 08:19 PM
|
1 response
10 views
0 likes
|
Last Post Today, 08:30 PM | ||
Started by Rapine Heihei, Today, 08:25 PM
|
0 responses
10 views
0 likes
|
Last Post Today, 08:25 PM |
Comment