NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 12-12-2010, 08:33 AM   #1
clearpicks
Senior Member
 
Join Date: Jan 2008
Posts: 257
Thanks: 0
Thanked 0 times in 0 posts
Default when is OnBarUpdate() called when the "CalculateOnBarClose" property is set to true?

Hello,

When is OnBarUpdate() called when the "CalculateOnBarClose" property is set to true? For example, in realtime, the first tick happened at 02:05:000, when would OnBarUpdate() corresponding to the 60Minute bar ( from 01:00:000 to 01:59:999 ) is called? Is it called at 02:00:000 after NT7 detecting the localtime or server time had passed 02:00:000 or it would wait for the first tick of next hour which was five seconds later than 2 O'Clock?

- Clearpicks
clearpicks is offline  
Reply With Quote
Old 12-12-2010, 10:15 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello ClearPicks,

Please see here for how chart bars are built:
http://www.ninjatrader.com/support/h..._are_built.htm

With CalculateOnBarClose = true, the bar is closed as soon as the first tick of the new bar arrives. Next bar open and prior bar close are the same event.
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timing sequence for "OnBarUpdate=True" AnotherTrader Automated Trading 3 08-06-2010 07:00 AM
Editable "custom tag" property for each chart/window (for use with virtual desktops) betaride Suggestions And Feedback 1 02-03-2010 06:26 AM
Is there a property like the "BarsSinceSession" that returns Grand Total Bar Nbr? ChiTrader2000 Strategy Development 4 12-23-2009 01:46 PM
Possible to set "ByStrategyPosition" or "PerEntryExecution" in strategy? kcsystemtrader Strategy Development 3 04-23-2009 09:54 AM
Indicator line goes to zero when CalculateOnBarClose set to True ThePatientOne Indicator Development 1 08-30-2007 11:42 AM


All times are GMT -6. The time now is 05:27 AM.