Is the computer processing all bars ever created in some historical database over and over, and discards them over and over, if they are not called for in the script, or what?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stochastics K[1] returns a value of 0
Collapse
X
-
I don't get the "Until enough bars are processed".. What tells the computer to process old bars? Doesn't it just process the bar that is continuously being updated in a trading day when price changes?
Is the computer processing all bars ever created in some historical database over and over, and discards them over and over, if they are not called for in the script, or what?
-
m96gran,
The NinjaTrader core calls the old bars. Otherwise you wouldn't be able to do calculations with the historical data. This is also called backtest.
When the script starts, NinjaTrader will call OnBarUpdate for every historical bar of data in order. The Historical bool will be true. After the last historical bar is processed, the Historical bool will be turned to false and then the script will start to process real-time bars.
The script does not just process the continuously updated bar as it does process historical bars first, and then processes real-time bars.
The script only processes the data loaded in the script (because thats what was loaded in the script) and processes this only once, before real-time data begins to be processed.
Please see the help guide on the Historical bool.
And on the differences between real-time and backtest.
Last edited by NinjaTrader_ChelseaB; 10-25-2016, 07:09 AM.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by eduardodipp7, Today, 10:29 AM
|
0 responses
1 view
0 likes
|
Last Post
by eduardodipp7
Today, 10:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
39 responses
272 views
0 likes
|
Last Post
by f.saeidi
Today, 10:23 AM
|
||
Started by ninza33, Today, 09:10 AM
|
1 response
10 views
0 likes
|
Last Post Today, 09:46 AM | ||
Started by goodknight777, Today, 08:43 AM
|
1 response
6 views
0 likes
|
Last Post Today, 09:25 AM | ||
Started by kramnor2001, Yesterday, 02:30 PM
|
4 responses
22 views
0 likes
|
Last Post
by bltdavid
Today, 10:44 AM
|
Comment