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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-27-2009, 11:57 PM   #1
eleven
Member
 
Join Date: May 2009
Posts: 81
Thanks: 1
Thanked 1 time in 1 post
Default Volume differences

I use "Volume[0]" in a strategy. Using print statements, I am seeing significant differences between back testing and real time volume upon bar close.

The historical volume appears to be accurate but the real time is definitely erroneous. It is approximately 10x higher and beyond. CalculateOnBarClose is set to true.

Any ideas on why this is occurring and how to rectify? Thanks.
eleven is offline  
Reply With Quote
Old 07-28-2009, 02:06 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,394
Thanks: 252
Thanked 968 times in 951 posts
Default

eleven, thanks for the post - which broker or connection are you using in your testing?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-28-2009, 10:06 AM   #3
eleven
Member
 
Join Date: May 2009
Posts: 81
Thanks: 1
Thanked 1 time in 1 post
Default

Bertrand,

I am using BarChart data feed.

Running live or in market replay give me erroneous data. Running historical in strategy analyzer seems to be accurate.
eleven is offline  
Reply With Quote
Old 07-28-2009, 10:17 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,394
Thanks: 252
Thanked 968 times in 951 posts
Default

eleven, then I would suggest contacting BarChart about their data directly, as NinjaTrader does not change the received live data (which would also be used in your replay data). Did this occur for all markets you tested on?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-28-2009, 12:19 PM   #5
eleven
Member
 
Join Date: May 2009
Posts: 81
Thanks: 1
Thanked 1 time in 1 post
Default

Prior to contacting BarChart I decided to troubleshoot this further and add VOL to my chart. The volume is accurate until the moment I started my strategy, as you can see from the volume spike on the lower panel.

How is this possible? The lower panel is a VOL indicator apart from my strategy. When I start my strategy not only is volume erroneous in my strategy but also the VOL indicator. When my strategy is not running the volume is accurate.

To me this doesn't seem like a data feed problem. What else could be going on with this?
Attached Images
File Type: jpg volume.jpg (33.0 KB, 15 views)
eleven is offline  
Reply With Quote
Old 07-28-2009, 12:27 PM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Close NT, reopen NT, connect data provider, open chart with no indicators or anything else, right click -> reload historical data, add VOL indicator, watch chart in real-time for awhile. Then add strategy and continue to watch volume.
NinjaTrader_Josh is offline  
Reply With Quote
Old 07-28-2009, 12:39 PM   #7
eleven
Member
 
Join Date: May 2009
Posts: 81
Thanks: 1
Thanked 1 time in 1 post
Default

Josh,

I will do as you describe. Hold my thoughts from above post. I might not of accurately analyzed this. I will take a look at this tomorrow.

eleven
eleven is offline  
Reply With Quote
Old 07-29-2009, 09:30 AM   #8
eleven
Member
 
Join Date: May 2009
Posts: 81
Thanks: 1
Thanked 1 time in 1 post
Default

It is the data feed. I opened a chart with just the VOL indicator. You can see the spike (bad data) on the picture. I've contacted BarChart and they are working on correcting the issue.
Attached Images
File Type: jpg data.jpg (8.5 KB, 10 views)
Last edited by eleven; 07-29-2009 at 11:35 AM.
eleven is offline  
Reply With Quote
Old 07-29-2009, 09:36 AM   #9
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,394
Thanks: 252
Thanked 968 times in 951 posts
Default

Thanks for reporting back eleven.
NinjaTrader_Bertrand 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
Differences in Open price marketmasher Charting 3 03-27-2009 07:22 AM
D Value Area differences ? T2020 Charting 2 01-26-2009 07:15 AM
Chart differences vast524 Charting 8 01-13-2009 05:24 AM
Differences in Exit Orders three faced devil Strategy Development 3 10-27-2008 10:41 AM
Calculation differences ThePatientOne Strategy Development 1 05-24-2007 12:07 PM


All times are GMT -6. The time now is 04:41 AM.