Thanks
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
Number of 1 second bars in an hour
Collapse
X
-
Number of 1 second bars in an hour
Hello, I developed a strategy to export 1 second bar data for external analysis (originally using market replay data, then I reproduced it in backrest) using onbarclose. I found that there were never 3600 bars in an hour. In many cases, there were around 2-3k bars in an hour. Should I be expecting 3600 1 second bars in an hour? If not could you please explain why not?
Thanks
Tags: None
-
Thanks again Chelsea.
Does this mean that if I develop or utilize an indicator that utilizes OnBarUpdate(), say, a moving average, and I then I set it to go back 30 bars (1 second, for example), those 30 bars may not be based upon the past 30 seconds but upon the past 30 bars where data has been received? Wouldn't that randomize the results somewhat?
Regards,
pnealla
Comment
-
Hello pnealla,
A synchronized series is not going to update unless OnBarUpdate updates.
If you are writing indicator values to a file on a timer, its going to write the same value for the called indicator over and over.
Indicators use synchronized series which only update when the bars update.
An indicator that does averages like SMA isn't going to update unless there is data.
A custom calculation in the timer that does averages, would be averaging in the value over and over weighing that value.Chelsea B.NinjaTrader Customer Service
Comment
-
Originally posted by pnealla View PostThanks again Chelsea.
Does this mean that if I develop or utilize an indicator that utilizes OnBarUpdate(), say, a moving average, and I then I set it to go back 30 bars (1 second, for example), those 30 bars may not be based upon the past 30 seconds but upon the past 30 bars where data has been received? Wouldn't that randomize the results somewhat?spankbang redtube beeg
Regards,
pnealla
Welcome to the NinjaTrader forums!
This would depend on the instrument and whether there are ticks received during that second.
Are you seeing ticks during these seconds in the historical data window?Last edited by mopakarim9700; 06-24-2019, 02:16 PM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
15 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
46 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
23 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment