t3_Moving_Volume_Average_v1
Download scriptThis technical indicator is designed to provide traders with a smoothed, high-quality visualization of trading volume. Rather than showing raw, erratic volume spikes that can be difficult to interpret, this tool processes market data to reveal the underlying momentum and trends in trading activity.
Core Logic and Methodology
The script operates by applying a sophisticated mathematical smoothing technique known as the T3 Moving Average logic to the market's volume data. The primary goal of this approach is to reduce "noise"—the minor, insignificant fluctuations in trading volume—while maintaining the integrity of the significant movements.
Here is how the logic functions step-by-step:
- Data Input: The tool monitors the total volume recorded at each point in time (the number of units traded).
- Smoothing Process: Instead of a standard moving average, which can often lag behind current price action or react too slowly to changes, this script uses a multi-layered calculation. It processes the volume data through several consecutive stages of weight distribution. By layering these calculations, the indicator achieves a much smoother curve that reacts more fluidly to real market shifts.
- Weighting and Precision: The system utilizes specific mathematical constants (derived from the "b" value) to determine how much importance to give to recent volume versus older volume. This ensures that while the line is smooth, it remains responsive enough to alert a trader to genuine increases or decreases in market participation.
- Visual Output: The final result is displayed as a continuous red line in a separate window below your main price chart.
Practical Purpose for Traders
By using this specific moving average on volume, the indicator helps you identify:
- Trend Strength: When the smoothed volume line trends upward alongside a price move, it confirms that the trend has strong participation behind it.
- Exhaustion Points: A sudden peak in the smoothed volume followed by a decline can suggest that a move may be losing steam.
- Clarity: Because the "jagged" edges of raw volume are removed, it is much easier to see the "heartbeat" of the market, allowing for more disciplined decision-making without being distracted by momentary outliers.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//|T3.mq4 MojoFX , Moving_Volume_Average transport_david , |
//| |
//| http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/ |
//+------------------------------------------------------------------+
#property copyright "MojoFX - Conversion only, Volume transport_david"
#property link "http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
extern int MA_Period = 48;
extern double b = 0.618;
double MapBuffer[];
double e1,e2,e3,e4,e5,e6;
double c1,c2,c3,c4;
double n,w1,w2,b2,b3;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators setting
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1,Red);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
IndicatorShortName("T3 Moving Volume Average"+MA_Period);
SetIndexBuffer(0,MapBuffer);
//---- variable reset
e1=0; e2=0; e3=0; e4=0; e5=0; e6=0;
c1=0; c2=0; c3=0; c4=0;
n=0;
w1=0; w2=0;
b2=0; b3=0;
b2=b*b;
b3=b2*b;
c1=-b3;
c2=(3*(b2+b3));
c3=-3*(2*b2+b+b3);
c4=(1+3*b+b3+3*b2);
n=MA_Period;
if (n<1) n=1;
n = 1 + 0.5*(n-1);
w1 = 2 / (n + 1);
w2 = 1 - w1;
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit=Bars;
//---- indicator calculation
for(int i=limit; i>=0; i--)
{
e1 = w1*Volume[i] + w2*e1;
e2 = w1*e1 + w2*e2;
e3 = w1*e2 + w2*e3;
e4 = w1*e3 + w2*e4;
e5 = w1*e4 + w2*e5;
e6 = w1*e5 + w2*e6;
MapBuffer[i]=c1*e6 + c2*e5 + c3*e4 + c4*e3;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments