NexusFi: Find Your Edge


Home Menu

 





Using NT Volume Indicators??? Better Read This !!!!


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one RJay with 11 posts (16 thanks)
    2. looks_two tarantino with 3 posts (0 thanks)
    3. looks_3 eDanny with 2 posts (2 thanks)
    4. looks_4 Zondor with 2 posts (1 thanks)
      Best Posters
    1. looks_one gomi with 4 thanks per post
    2. looks_two RJay with 1.5 thanks per post
    3. looks_3 eDanny with 1 thanks per post
    4. looks_4 Zondor with 0.5 thanks per post
    1. trending_up 11,270 views
    2. thumb_up 24 thanks given
    3. group 6 followers
    1. forum 23 posts
    2. attach_file 7 attachments




 
Search this Thread

Using NT Volume Indicators??? Better Read This !!!!

  #11 (permalink)
tarantino
Willowbrook, IL
 
Posts: 32 since Sep 2010
Thanks Given: 71
Thanks Received: 39



I don't understand where you see a bug?

You set volume to zero and expect it not to be a zero? You better check your logic before reporting bugs.
 
Code
 
protectedoverridevoid OnBarUpdate()
{
 
if (FirstTickOfBar)
{
netVolUp = 0;
}
VolumeUp.Set(netVolUp);
}

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
32 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
19 thanks
  #12 (permalink)
 
eDanny's Avatar
 eDanny 
East Rochester, NY
 
Experience: Intermediate
Platform: NT
Posts: 329 since Jul 2009
Thanks Given: 18
Thanks Received: 425

I'm having the same problem with NT7 code. Code that works fine with NT6.5 will always show one less trade per bar in NT7. For example if VOL says 300 my indicator says 299 in NT7 and 300 in 6.5. This is a tough nut to crack.

Dan

Reply With Quote
Thanked by:
  #13 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 758
Thanks Received: 787



tarantino View Post
I don't understand where you see a bug?

You set volume to zero and expect it not to be a zero? You better check your logic before reporting bugs.
 
Code
 
protectedoverridevoid OnBarUpdate()
{
 
if (FirstTickOfBar)
{
netVolUp = 0;
}
VolumeUp.Set(netVolUp);
}

Dear tarantino,

Thank you for taking the time to look at my code. You are absolutely correct. The line of code you indicated does indeed set the variable to "0".

This line of code you refer to is correct coding in NT 6.5 and hopefully will soon be in NT 7.

If you look at the other indicator I posted along with this one, you will see the code with the patch to temporarily fix the problem,

 
Code
if (FirstTickOfBar)
            {
                
                netVolUp = 0;
                netVolUp = netVolNewBar;

            }
In this indicator, you will see that the next line in the code, is the same variable being assigned a non zero value.

This is part of the temporary patch until NT can fix their code.

I'm sorry that you got confused.

RJay

Started this thread Reply With Quote
  #14 (permalink)
tarantino
Willowbrook, IL
 
Posts: 32 since Sep 2010
Thanks Given: 71
Thanks Received: 39

Once again.
protectedoverridevoid OnBarUpdate()
{

if (FirstTickOfBar)
{
netVolUp = 0;
}
VolumeUp.Set(netVolUp);
}

If you are expecting that VolumeUp[0] at this stage (if firsttickofbar) is non zero, then I am crazy perhaps.

I would report a bug if VolumeUp[0] != 0

Reply With Quote
  #15 (permalink)
 
eDanny's Avatar
 eDanny 
East Rochester, NY
 
Experience: Intermediate
Platform: NT
Posts: 329 since Jul 2009
Thanks Given: 18
Thanks Received: 425

I can attest to the fact that I see the first tick volume being dropped at FirstTickOfBar in NT7. What I am seeing is the total volume is off by the volume of the first tick. If I add that volume back in my totals will be correct but there is another problem with plotting. If the next bar sits there with only the first tick, visible in a very slow period, the previous plot is carried forward and shows the result of the last bar with the added volume from the first tick. It is replaced with the correct plot if there is another trade during that bar period. If not the plot disappears and shows no volume when the next bar starts. This is unacceptable to me. Remember this will not be noticeable during regular hours with volume but can be seen using something like the TF on a 30 second chart during after hours when volume is very low. So, to recap.

Problem one: Volume of first tick is dropped but can be added back using additional code but should be unnecessary.

Problem two: Plotting has a problem which is only visible under the right conditions. This is not a problem with NT6.5 and I cannot find a way to fix it in NT7.

Dan

Reply With Quote
Thanked by:
  #16 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 758
Thanks Received: 787

OK Folks,

After working with NT as well as other programmers here at futures.io (formerly BMT) this week, Here are my findings.

NT has confirmed that there may be a issue using OnMarketData data with privately constructed indicator.

Since NT does not construct any of their indicators in this way, They have stated that no changes are planned to resolve the differences between NT 6.5 and NT 7.



Here's the problem.


In NT 6.5, CurrentBar and FirstTickOfBar can be used to capture all price/volume ticks for each bar from OnMarketData in real time.

In NT 7 , CurrentBar and FirstTickOfBar can be used to capture all price/volume ticks for each bar from OnMarketData except the first tick of the bar in real time.


This means that compiling accurate data from OnMarketData in NT 7 is going to be more complicated than NT 6.5.

All data from the "Bid, Ask, and Last" need to be collected, at every tick, and temporarily saved.


At FirstTickOfBar, The previous "Last"tick and the current "Last" tick are going to both get processed at the same time and updated to the chart together.

This means Indicators from NT 6.5, just because they compile in NT 7, does not mean they are working properly.

I am putting together some working samples to show you what the new coding should look like.


Stay Tuned,


RJay


P.S. Same problem is in OnMarketDepth for all counting indicators as well. jtRealStats indicators are not affected by this problem.

Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 758
Thanks Received: 787

Well,

I have good news and bad news.

The good news is that these indicators work really well on every chart type I tested them on except Volume.

The bad news... reread the previous line!!!

Doubling up the first two ticks results in an equal to volume bar plus the volume of the unsplit ticks.

You may not even notice.

Attached are a Total Volume Indicator sample code and a Delta Volume Indicator sample code.

Attached image compares them with the VOL indicator.

Note, A perfect match between VOL and The Total Volume Indicator.


Let me know what you think,


RJay

Update: There is a problem with the delta indicator . I just updated to a new indicator with the same name.

Attached Thumbnails
Click image for larger version

Name:	TF 12-10 (5 Tick)  10_21_2010.jpg
Views:	334
Size:	213.7 KB
ID:	24018  
Attached Files
Elite Membership required to download: Sample_NT7_OnMarketData_Total_Volume_Indicator_With_Patch.cs
Elite Membership required to download: Sample_NT7_OnMarketData_Delta_Volume_Indicator_With_Patch.cs
Started this thread Reply With Quote
Thanked by:
  #18 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Can the indicators be coded so that they would work correctly if it IS a volume chart?

If so, you can put in a code switch since we can programatically detect whether the periodtype is Volume.

if(Bars.Period.Id == PeriodType.Volume)

... execute code suitable for volume chart

else

... execute code with FirstTickOfBar workaround



Note: My new version of BuySellVolume that includes the FirstTickOfBar fix gives perfect match so that buyvolume + sellvolume from GomRecorder equals Volume[0], on tick charts, anyway.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #19 (permalink)
 Michael.H 
CA
 
Experience: Master
Platform: Marketdelta and Ninja
Broker: Velocity
Trading: NQ
Posts: 663 since Apr 2010
Thanks Given: 64
Thanks Received: 529

Ok.. so if i have GOMcd indicator loaded up on a volume chqrt, i'm gonna have problems? You saying that volume charts are not correct to begin with? or is it the indicators loaded up on volume charts?

Reply With Quote
  #20 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 758
Thanks Received: 787



Zondor View Post
Can the indicators be coded so that they would work correctly if it IS a volume chart?

If so, you can put in a code switch since we can programatically detect whether the periodtype is Volume.

if(Bars.Period.Id == PeriodType.Volume)

... execute code suitable for volume chart

else

... execute code with FirstTickOfBar workaround



Note: My new version of BuySellVolume that includes the FirstTickOfBar fix gives perfect match so that buyvolume + sellvolume from GomRecorder equals Volume[0], on tick charts, anyway.

Hi Zondor,

There may be a way to load the first and second ticks separately but it involves altering the chart programs.

I seriously doubt that NT would even consider it.

On the bright side, The GomIndicatorRecorder might be altered to compensate.

problem could also be fixed at the Indicator for non Gom indicators. I'll have to think about it.

RJay

Started this thread Reply With Quote




Last Updated on November 1, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts