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 Zondor with 2 posts (1 thanks)
    4. looks_4 eDanny with 2 posts (2 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,298 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 !!!!

  #21 (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

Hi All,

I just posted the new version of the sample delta indicator in post 17.

I gave it the same name, so just overwrite that other piece of crap!!!

This new one's much simpler, cleaner and accurate.

Ticks 1 and 2 now load separately. Volume Chart Problem remains.

RJay

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
How to apply profiles
Traders Hideout
 
  #22 (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


Michael.H View Post
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?

Hi Michael,

Its been my experience that a lot of volume indicators go a little spastic when put on a volume chart.

GomCD may have issues, But testing it in market replay on a TF 10 volume chart, it does seem to be behaving it self.

RJay

Started this thread Reply With Quote
  #23 (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


This is what happens when we put Gom indicators on a volume based chart. In Panel 2 we have buyvolume plus sellvolume from the BuySellVolume indicator (my latest version with the FirstTickOfBar workaround) In Panel 3 we have the total volume as reported by Volume[0], Ninjatrader real time volume.

It looks like the discrepancies may be due to the GomRecorder not "splitting" trades that cause the sum of buy and sell volume to be unequal to the volume interval of the chart.

Overall the errors probably mostly cancel out, but on a bar by bar basis there are errors. Best to use tick interval charts with Gom stuff, because each record in the Gom data file is a tick, ie a trade.

Attached Thumbnails
Click image for larger version

Name:	buyvolume plus sellvolume  vs Volume[0] on a Volume based chart.jpg
Views:	239
Size:	141.1 KB
ID:	24096  
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #24 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505

Basically what happens is that now in NT7 OnMarketData fires before OnBarUpdate. In my opinion this is more logical but it has its side effects.

Here is how you could implement a correct tick logic using a queue to uncouple OMD from OBU.
This works with CalculateOnBarClose true and false

The idea is to queue ticks in OMD, and unqueue them when needed in OBU.

One of the advantage of this kind of solution is that all your logic is kept only in one place: in the OnBarUpdate method.


Caution : you need to add
 
Code
                            
using System.Collections.Generic
in the indicator header

 
Code
                            
        #region Variables
        
Queue<MarketDataEventArgstickQueue=new Queue<MarketDataEventArgs>();
        
int totalvolume=0;
        
#endregion

        
protected override void Initialize()
        {
            
Overlay                false;
            
Add(new Plot(Color.DarkRed,PlotStyle.Bar,"Vol"));
        }
        
        protected 
override void OnBarUpdate()
           {
            
MarketDataEventArgs e;
            
            if (
FirstTickOfBar)
                 
totalvolume=0;
            
            
int nbTicks=tickQueue.Count;
            
            
// if COBC=true then last ticks belongs to next bar
            
if (CalculateOnBarClose)
                
nbTicks--;
            
            
            for (
int i=0;i<nbTicks;i++)
            {
                
e=tickQueue.Dequeue();
                
totalvolume += (int)e.Volume;
            }
            
            
Value.Set(totalvolume);
            
        }
        
        protected 
override void OnMarketData(MarketDataEventArgs e)
        {
            if (
e.MarketDataType==MarketDataType.Last)
                
tickQueue.Enqueue(e);
            
        } 

Reply With Quote
Thanked by:




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