T3_Momentum_Burst
Download scriptThis tool is designed to help traders visualize and interpret market momentum by smoothing out price fluctuations to reveal clearer underlying trends. It operates as a specialized technical indicator that calculates the "force" behind price movements over a specific timeframe.
Core Logic and Functionality
The script functions by processing market data through a multi-layered mathematical filter. Instead of simply looking at raw price changes, which can often be "noisy" or erratic, this logic uses a progressive smoothing technique. Here is how that process works conceptually:
- Momentum Foundation: The tool begins by identifying the basic momentum of the market—essentially measuring how fast and in what direction the price is moving over a short period.
- Recursive Smoothing: To prevent the indicator from reacting too wildly to minor, insignificant price "hiccups," the script passes that momentum through several consecutive stages of weighted calculations. Think of this like a series of filters; each layer refines the data, removing noise while preserving the significant directional trend.
- Weighted Weighting (The T3 Logic): The tool utilizes a specific weighting system (based on the T3 calculation method) that gives more importance to recent price action while still acknowledging historical context. This allows the indicator to be more responsive than a standard moving average but much smoother than a basic momentum oscillator.
- Final Output: The final result is plotted as a continuous line in a separate window below your main price chart. By observing this line, traders can see the "pulse" of the market:
- A rising line suggests accelerating upward momentum.
- A falling line suggests decelerating downward momentum.
- Flat movements suggest a lack of conviction in the current trend.
Summary for Traders
Essentially, this script acts as a "momentum stabilizer." It takes the raw, often chaotic movement of price and translates it into a smooth, readable curve. By looking at this curve, you can better identify when a trend is gaining strength, losing steam, or reaching a point of exhaustion, helping you make more informed decisions on whether to enter or exit a trade based on the current market "flow."
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| T3_Momentum_Burst.mq4 |
//| transport_david |
//| http://groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/ |
//+------------------------------------------------------------------+
#property copyright "transport_david hack of Perky_z hack of Mojos T3"
#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 Mom_Period = 1;
extern int T3_Period = 28;
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_Momentum_Burst "+T3_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=T3_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*(iMomentum(NULL,0,Mom_Period,PRICE_CLOSE,i)-iMomentum(NULL,0,Mom_Period,PRICE_CLOSE,i+1))) + 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