NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 10-26-2010, 02:59 PM   #1
gomifromparis
Senior Member
 
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
Default Volume total seems to depend on chart settings

Hi,

I made a simple indicator that sums total volume of the day
Code:
        #region Variables
        // Wizard generated variables
        // User defined variables (add any user defined variables below)
        double totalvolume=0.0f;
        
        #endregion

        /// <summary>
        /// This method is used to configure the indicator and is called once before any bar data is loaded.
        /// </summary>
        protected override void Initialize()
        {
            Add(new Plot(Color.FromKnownColor(KnownColor.Blue), PlotStyle.Bar, "VolSum"));
            Overlay                = false;
            CalculateOnBarClose =false;
            
        }

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
        {
               //only use historical
            
            if (Historical)
            {
                if (Bars.SessionBreak)
                    totalvolume=0;
        
                totalvolume+= Volume[0];
                VolSum.Set(totalvolume);    
            }

        }
It appears the sum at the end of the day depends on the chart settings : 1K vol, 10 k volume and 50 k Volume have different closing volumes.

Using very small granularity : 10 ticks, 1000 give the same "correct" volume, but when the granularity increases, some volume seams to disappear.

It's probly an erro in my indicator but it's very simple...

Any clue ?
Attached Images
File Type: png 1k.png (39.4 KB, 17 views)
File Type: png 10k.png (45.6 KB, 17 views)
File Type: png 50k.png (27.8 KB, 15 views)
gomifromparis is offline  
Old 10-26-2010, 04:09 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello Gomi,

You should make sure that you're looking at the same bars across the different tests. Since NinjaTrader time stamps when bars end, there can be differences when comparing against time and tick, volume.


The difference between your Indicator [0] - Indicator [1] should be the same as VOL()[0], so checking when these values are different should help identify what's happening. .
NinjaTrader_RyanM is offline  
Old 10-26-2010, 04:33 PM   #3
gomifromparis
Senior Member
 
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
Default

Hi Ryan,

In the meantime I made a "Reload historical data" and restarted NT, and now the problem is gone.

Will see tomorrow if I can reproduce.

Thanks
gomifromparis is offline  
Old 10-26-2010, 05:55 PM   #4
gomifromparis
Senior Member
 
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
Default

You might want to check "Renko 1" though, it seem there is some volume constantly added on each bar. Renko > 1 is OK.
gomifromparis is offline  
Old 10-27-2010, 02:01 AM   #5
playafh69
Senior Member
 
Join Date: Dec 2008
Posts: 193
Thanks: 0
Thanked 1 time in 1 post
Default

Gomi... I use volume charts, and I def noticed the problem before myself. I think its the way ninja handles incoming ticks on volume charts. I ran a chart live and( on zenfire) and i was comparing it to my dtn feed on a different computer... after midday, i noticed some differences, meaning the bars are different. Normally, i would say its because maybe zenfire bundles ticks. But when i hit reload historical data, the charts matched.
Its happened more than once.
playafh69 is offline  
Old 10-27-2010, 05:51 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Quote:
Originally Posted by gomifromparis View Post
You might want to check "Renko 1" though, it seem there is some volume constantly added on each bar. Renko > 1 is OK.
Thanks for reporting in gomi, we'll look into it.
NinjaTrader_Bertrand is offline  
Old 10-27-2010, 06:48 AM   #7
gomifromparis
Senior Member
 
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
Default

Thanks Bertrand, I was looking for ways to improve mapping volume from GomRecorder indicators, so was looking at difference between total of NT volume - difference in total Gom volume. As they use same data, the difference should be fluctuating around 0, which it does for almost every chart (see Renko 2 chart) except Renko 1 which shows an increasing line, showing a linear increasing difference between both volumes, meaning each Vol[0] of the Renko 1 chart get a constant amount of too much volume.
Attached Images
File Type: png rk2.png (66.4 KB, 18 views)
File Type: png rk1.png (69.9 KB, 16 views)
gomifromparis is offline  
Old 10-27-2010, 09:14 AM   #8
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

I've been looking at this and so far haven't seen any issues with renko 1 bar. Can you share the indicator files and details of your test? I copied your script in the first post and have it draw a diamond when indicated below. I'm only looking at historical values.

if (Gomi[0] - Gomi[1] != VOL()[0])
DrawDiamond(
"a" + CurrentBar, true, 0, High[0] + TickSize, Color.Red);
NinjaTrader_RyanM is offline  
Old 10-27-2010, 10:25 AM   #9
gomifromparis
Senior Member
 
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
Default

Hi Ryan,

You're not going to find it that way, by contruction
Gomi[0] - Gomi[1] = Vol[0] ....

Try plotting in console the sum of volume of last 10 days in the ES

Here are my results :
10 000 Volume chart : 12590377
150 tick chart : 12590377
30 second chart : 12590287

Renko 2 chart : 12592723 , all chart is 2367 bars long
Renko 1 chart : 12608305 , all chart is 17949 bars long.

As you can see there is a mismatch in Renko volumes as compared to other volumes. Now if we assume each volume bar in Renko charts is off by 1, we could estimate corrected volumes :

Renko 2 chart :
12592723 - 2367 = 12590356
Renko 1 chart :
12608305 - 17949 = 12590356

Hey, seems like I did all the debugging work... And I don't even use Renko charts....!



Quote:
Originally Posted by NinjaTrader_RyanM View Post
I've been looking at this and so far haven't seen any issues with renko 1 bar. Can you share the indicator files and details of your test? I copied your script in the first post and have it draw a diamond when indicated below. I'm only looking at historical values.

if (Gomi[0] - Gomi[1] != VOL()[0])
DrawDiamond(
"a" + CurrentBar, true, 0, High[0] + TickSize, Color.Red);
gomifromparis is offline  
Old 10-27-2010, 11:16 AM   #10
playafh69
Senior Member
 
Join Date: Dec 2008
Posts: 193
Thanks: 0
Thanked 1 time in 1 post
Default

lol.... nice gomi.
playafh69 is offline  
Old 10-27-2010, 03:17 PM   #11
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi Gomi,

I see differences but they are not so closely correlated with the number of bars on each chart.

Your test doesn't show that extra volume is added to renko 1. It is is difficult to line up so that you are comparing the exact same data across these different series. The time stamp of the renko bars is not even and this can lead to viewing different data even when all the parameters are the same.

Take a look at the time stamp of the first bar in the series. This will be different when comparing renko 1 versus renko 2.

You'll see the same thing on minute series as well. A 5 and 10 minute volume numbers should be the same. A 3 minute and 60 minute will not.
NinjaTrader_RyanM is offline  
Old 10-27-2010, 03:35 PM   #12
gomifromparis
Senior Member
 
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
Default

Hi Ryan,

Sorry but despite your efforts you guys from support are not going to get me smash my head against the keyboard like I did on the ninja 7 timezone issue. As I actually don't care at all about renko volume, I won't insist this time.

You can close the thread.
gomifromparis is offline  
 

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
Total ticks per volume bar ? ssg10 Indicator Development 1 04-09-2010 01:19 PM
total volume trader413 Indicator Development 1 09-08-2009 07:18 AM
Does everyone see the same tick bars or does it depend on when the chart starts? cunparis Strategy Development 4 04-14-2009 01:43 PM
TM total volume won't display Eman Charting 1 10-01-2008 03:10 PM
Getting today's total volume adrian Strategy Development 1 03-29-2008 03:41 PM


All times are GMT -6. The time now is 06:58 PM.