![]() |
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
|
|||||||
| Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
|
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);
}
}
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 ? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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. .
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
|
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 |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
|
You might want to check "Renko 1" though, it seem there is some volume constantly added on each bar. Renko > 1 is OK.
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2008
Posts: 193
Thanks: 0
Thanked 1 time in 1 post
|
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. |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Thanks for reporting in gomi, we'll look into it.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
|
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.
|
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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);
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
|
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:
|
|
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Dec 2008
Posts: 193
Thanks: 0
Thanked 1 time in 1 post
|
lol.... nice gomi.
|
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Oct 2007
Posts: 333
Thanks: 2
Thanked 12 times in 7 posts
|
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. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
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 |