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 02-08-2012, 09:59 AM   #1
Edward Kunafi
Senior Member
 
Join Date: May 2009
Posts: 283
Thanks: 6
Thanked 2 times in 2 posts
Default TickCount

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
Edward Kunafi is offline  
Reply With Quote
Old 02-08-2012, 10:19 AM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

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.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 02-08-2012, 10:41 AM   #3
Edward Kunafi
Senior Member
 
Join Date: May 2009
Posts: 283
Thanks: 6
Thanked 2 times in 2 posts
Default TickCount

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.
Edward Kunafi is offline  
Reply With Quote
Old 02-08-2012, 11:06 AM   #4
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

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.
Attached Images
File Type: jpg AAPL_kinetick.jpg (68.1 KB, 33 views)
File Type: jpg aapl_esig.jpg (67.8 KB, 26 views)
Attached Files
File Type: cs BarTicks.cs (5.7 KB, 38 views)
NinjaTrader_AdamP is offline  
Reply With Quote
Old 02-08-2012, 11:29 AM   #5
Edward Kunafi
Senior Member
 
Join Date: May 2009
Posts: 283
Thanks: 6
Thanked 2 times in 2 posts
Default TickCount

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.
Edward Kunafi is offline  
Reply With Quote
Old 02-08-2012, 11:31 AM   #6
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Edward,

I will suggest to development on your behalf.

Please let me know if I may assist further.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 02-11-2012, 10:55 AM   #7
Crassius
Senior Member
 
Join Date: Nov 2008
Posts: 186
Thanks: 38
Thanked 32 times in 26 posts
Default

Thanks for BarTicks...


Answered my own question and edited it out


Thanks
Last edited by Crassius; 02-11-2012 at 11:06 AM.
Crassius 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
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


All times are GMT -6. The time now is 03:54 PM.