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 proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment