NexusFi: Find Your Edge


Home Menu

 





Indicator to show average tick size


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Tradeher with 2 posts (1 thanks)
    2. looks_two JamesBahn with 2 posts (0 thanks)
    3. looks_3 Fat Tails with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 8,195 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
JamesBahn
Playa Hermosa, Costa Rica
 
Posts: 2 since Dec 2010
Thanks Given: 1
Thanks Received: 0

I trade the ES using several different tick charts. I am hoping to find (or have created) and indicator that will show me the average trade size for each tick bar. To be more clear, most of my trades are taken from price action on a 3500Tick chart. Is there an indicator available that will show me average trade size of the 3500 trades that make up that bar?

I have no programming skills whatsoever so I dont even know if such a thing is possible. It seem that it would be since I have true Time and Sales data using Kinetick+NT.

Thank you for any insight you may be able to provide.

Cheers.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Orban at 29pct as Hungary Votes Tomorrow -- McIlroy Surg …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114



JamesBahn View Post
I trade the ES using several different tick charts. I am hoping to find (or have created) and indicator that will show me the average trade size for each tick bar. To be more clear, most of my trades are taken from price action on a 3500Tick chart. Is there an indicator available that will show me average trade size of the 3500 trades that make up that bar?

I have no programming skills whatsoever so I dont even know if such a thing is possible. It seem that it would be since I have true Time and Sales data using Kinetick+NT.

Thank you for any insight you may be able to provide.

Cheers.

The average trade size for a 3,500 tick bar would be the total volume of the bar divided by 3,500. The 3,500 does not change from one bar to the next, so it is sufficient, if you put just a volume indicator on your tick chart.

If you want, you can also modify the volume indicator by dividing the total volume by the number of Ticks, just change the code of the volume indicator from

 
Code
Value.Set(Volume[0]);
to

 
Code
Value Set(Volume[0]/BarsPeriod.Value);
save under a new name and compile via F5. It should now display the average volume per tick. Not tested.


Reply With Quote
  #4 (permalink)
JamesBahn
Playa Hermosa, Costa Rica
 
Posts: 2 since Dec 2010
Thanks Given: 1
Thanks Received: 0

Thanks. I figured it was that simple, but I know absolutely nothing about how to read/write code.

Cheers!


Reply With Quote
  #5 (permalink)
 
Tradeher's Avatar
 Tradeher 
BayShore, New York USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: ES Emini
Posts: 4 since May 2017
Thanks Given: 2
Thanks Received: 2

Below is the volume indicator in Ninja 8. Where would you insert

(If you want, you can also modify the volume indicator by dividing the total volume by the number of Ticks, just change the code of the volume indicator from


Code
Value.Set(Volume[0]);
to


Code
Value Set(Volume[0]/BarsPeriod.Value)



public class VOL : Indicator
{
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = Custom.Resource.NinjaScriptIndicatorDescriptionVOL;
Name = Custom.Resource.NinjaScriptIndicatorNameVOL;
BarsRequiredToPlot = 0;
Calculate = Calculate.OnEachTick;
DrawOnPricePanel = false;
IsSuspendedWhileInactive = true;

AddPlot(new Stroke(Brushes.DodgerBlue, 2), PlotStyle.Bar, Custom.Resource.VOLVolume);
AddLine(Brushes.DarkGray, 0, Custom.Resource.NinjaScriptIndicatorZeroLine);
}
else if (State == State.Historical)
{
if (Calculate == Calculate.OnPriceChange)
{
Draw.TextFixed(this, "NinjaScriptInfo", string.Format(Custom.Resource.NinjaScriptOnPriceChangeError, Name), TextPosition.BottomRight);
Log(string.Format(Custom.Resource.NinjaScriptOnPriceChangeError, Name), LogLevel.Error);
}
}
}

protected override void OnBarUpdate()
{
Value[0] = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0];
}
}
}

#region NinjaScript generated code. Neither change nor remove.

namespace NinjaTrader.NinjaScript.Indicators
{
public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
{
private VOL[] cacheVOL;
public VOL VOL()
{
return VOL(Input);
}

public VOL VOL(ISeries<double> input)
{
if (cacheVOL != null)
for (int idx = 0; idx < cacheVOL.Length; idx++)
if (cacheVOL[idx] != null && cacheVOL[idx].EqualsInput(input))
return cacheVOL[idx];
return CacheIndicator<VOL>(new VOL(), input, ref cacheVOL);
}
}
}

namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
{
public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
{
public Indicators.VOL VOL()
{
return indicator.VOL(Input);
}

public Indicators.VOL VOL(ISeries<double> input )
{
return indicator.VOL(input);
}
}
}

namespace NinjaTrader.NinjaScript.Strategies
{
public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
{
public Indicators.VOL VOL()
{
return indicator.VOL(Input);
}

public Indicators.VOL VOL(ISeries<double> input )
{
return indicator.VOL(input);
}
}
}

#endregion


Reply With Quote
Thanked by:
  #6 (permalink)
lightsun47
Toronto, Canada
 
Posts: 438 since May 2018
Thanks Given: 539
Thanks Received: 347

Not sure if you can bump almost 10 year old thread.

Sent using the NexusFi mobile app


Reply With Quote
  #7 (permalink)
 
Tradeher's Avatar
 Tradeher 
BayShore, New York USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: ES Emini
Posts: 4 since May 2017
Thanks Given: 2
Thanks Received: 2

Well is there an indicator to show average trade size for ninja8. Or can you suggest a line of code to add to ninja 8 volume indicator


Reply With Quote




Last Updated on September 14, 2020


© 2026 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 - Downloads - Top
no new posts