NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 07-06-2007, 06:01 AM   #1
Fabrice
Junior Member
 
Join Date: Jul 2007
Location: Russia
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default Catch the end of a minute bar on a tick by tick OnBarUpdate event

I was wondering if there is a way to catch the end of a minute bar when updating a strategy on a tick per tick basis?

I explain:

protectedoverridevoid Initialize()
{
....
Add(PeriodType.Minute,1);
CalculateOnBarClose = false;

}

On the OnBarUpdate function, let say I want to compute and indicator only at the end of the minute bar serie, if I use I(BarsArray[1],some paremeters)[1] I will have the value of that indicator at the end of last bar.

The value of the indicator for the current bar computed by I(BarsArray[1],some paremeters)[0] being updated at every tick.

However the problem with this method is that I need to wait the first tick of the new bar to have the value of the previous finished 1 minute bar.

Is there any other ways in Ninja to avoid my 1 tick delay and know that the current bar is finished, some form of EndOfBar finished event? That event could be triggered by some timer event.

Thanks for the support.
Fabrice.
Fabrice is offline  
Reply With Quote
Old 07-06-2007, 06:53 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Please see here: http://www.ninjatrader-support.com/v...ead.php?t=2571
NinjaTrader_Dierk 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
Easiest way to check for last tick on a tick bar? higler General Programming 8 02-28-2009 02:01 PM
Woodie's Pivots different on minute and tick charts. laura Charting 11 09-06-2007 06:39 AM
Catch the end of a minute bar on a tick by tick OnBarUpdate event Fabrice Automated Trading 5 07-06-2007 12:28 PM
Open tick to DOM deanldavis475 Connecting 3 06-22-2007 08:11 AM
Tick counter gone? LG Charting 2 02-06-2007 07:31 AM


All times are GMT -6. The time now is 03:46 AM.