NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 06-20-2006, 08:07 PM   #1
richard
 
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hi. I am running an indicator where I have set CalculateOnBarClose=true. I believe this means that OnBarUpdate() will only fire when the present bar closes.

However, I have initialized

MarketData.MarketDataItem +=
new MarketDataItemEventHandler(MarketData_MarketDataIt em);

so I am processing incoming tick data.

When I set CalculateOnBarClose = true, my DrawText() statements to bar = 0, will not draw the text on the current bar, but the bar before. It will only draw on the current bar if I set CalculateOnBarClose=false. But then, the OnBarUpdate() event fires on every tick.

My question is if I set CalculateOnBarClose=false, is there a way for me to tell when the current bar will close and we are moving to the next bar in the OnBarUpdate() event?

Thank you.
richard is offline  
Reply With Quote
Old 06-21-2006, 12:10 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

Not in NT5. We have added a FirstTickOfBar property to NT6 strategies and will consider doing the same for indicators.
NinjaTrader_Ray is offline  
Reply With Quote
Old 06-21-2006, 01:53 AM   #3
richard
 
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

OK. Thank you.
richard 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


All times are GMT -6. The time now is 01:05 PM.