![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: May 2009
Posts: 283
Thanks: 6
Thanked 2 times in 2 posts
|
Hello Support,
I am doing indicator using TickCount, when Indicator is loaded, the Bars.TickCount give correct historical values, but when it is running realtime afterwards, Bars.TickCount is always 1 ?! resulting errorneous plots. Is this because Bars.TickCount is referring to new bar that just open? But COBC is true, should it not give TickCount of last completed bar? NT has Volume DataSeries, does NT have TickCount DataSeries? How do I get correct TickCount ? Regards, Edward K |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Edward,
I am happy to assist you. Yes, you would need to use COBC = false. Volume and tick counts are highly correlated, so a volume data series would look nearly identical to a tick count data series times some constant. Please let me know if I may assist further.
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: May 2009
Posts: 283
Thanks: 6
Thanked 2 times in 2 posts
|
Hello AdamP,
That is not good. Shoud it not reflect the completed bar TickCount?, because when COBC is true, Volume[0] is referring the completed bar, it does not have the first Tick's volume. So Bars.TickCount should be TotalTicks of the just completed bar. If that is not possible, NT should create another variable for this or best is to provide IntSeries TickCount, please suggest this to your development team! I would not like to set COBC to true, too much wasted computing just to get TotalTick. Market is dynamic, ratio of Volume to TickCount is not constant, it varies bar to bar, depending sentiment or agressiveness of traders. Thanks, Regards, Edward K. |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Edward,
You can try to use my indicator to get the ticks for past bars. Its counting them in blocks of 150 ticks but you can change this in the code. I have attached comparisons of TickCount vs. Volume for Kinetick and eSignal data. I reloaded all historical tick data each time before hand. As you can see its not exact but its pretty close. There may be differences between real-time and historical however.
Adam P.
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: May 2009
Posts: 283
Thanks: 6
Thanked 2 times in 2 posts
|
Hello AdamP,
I see the code, unique application of NT7 multi time-frame feature. Will adopt this for the time-being. But still hoping future NT release could address this in a consistent manner. Many thanks for the codes. Regards, Edward K. |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
|
Edward,
I will suggest to development on your behalf. Please let me know if I may assist further.
Adam P.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TickCount always 180 in Market Replay | symphys | Version 7 Beta General Questions & Bug Reports | 3 | 04-20-2010 01:25 PM |
| Bars.Tickcount on xSecond chart | clint2008 | Charting | 3 | 06-29-2009 12:06 PM |