![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Not in NT5. We have added a FirstTickOfBar property to NT6 strategies and will consider doing the same for indicators.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Join Date: Mar 2006
Location: , ,
Posts: 18
Thanks: 0
Thanked 0 times in 0 posts
|
OK. Thank you.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|