Turbo_JMACD
Download scriptThis tool is a specialized technical analysis indicator designed to help traders identify momentum and potential trend reversals in the financial markets. It functions by calculating the relationship between two different types of smoothed price averages, providing a visual representation of whether the market's speed is accelerating or decelerating.
How the Logic Works
1. The Core Calculation (Turbo JMA) Unlike standard moving averages that can be "laggy" (reacting too slowly to recent price changes), this script utilizes a specific type of smoothing called the "Turbo JMA." It calculates two different versions of this average:
- A Fast Version: This tracks short-term price fluctuations quickly.
- A Slow Version: This tracks long-term price trends more broadly.
By subtracting the Slow version from the Fast version, the script produces a "momentum value." When this value is positive and rising, it suggests bullish strength; when it is negative and falling, it indicates bearish pressure.
2. The Signal Line To make the momentum data easier to read, the script takes that primary momentum value and performs a second calculation on it—a Simple Moving Average (SMA). This creates a "Signal Line."
The purpose of this second line is to smooth out the "noise" of the fast-moving data. It helps traders identify when the momentum is actually changing direction rather than just experiencing a minor, temporary fluctuation.
Visual Representation
- The Histogram: The primary output is shown as a histogram. This allows you to see at a glance how far the current momentum is from the zero line. The height of these bars represents the strength of the move.
- Trend Identification: By watching how these bars interact with the Signal Line, traders can look for "crosses." When the histogram moves from one side of the signal line to the other, it serves as a potential cue that the market trend may be shifting from upward to downward (or vice versa).
Summary for Traders
Essentially, this script acts as a "speedometer" for price action. It tells you not just where the price is going, but how fast it is getting there. By using the advanced Turbo JMA smoothing logic, it aims to provide a cleaner, more responsive look at market trends compared to standard indicators, helping users spot potential entry and exit points more effectively.
//+---------------------------------------------------------------------------------------+
//| Turbo_JMACD.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| Modified by bluto to use Turbo_JMA based on Typical Price (HLC/3 |
//| http://www.metaquotes.net/ |
//+---------------------------------------------------------------------------------------+
#property copyright "Copyright © 2005, scorpion."
#property link "http://www.fxfisherman.com/"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Silver
#property indicator_color2 Red
//---- indicator parameters
extern int FastJMA=12;
extern int SlowJMA=26;
extern int SignalSMA=9;
extern int FastJMAPhrase=0;
extern int SlowJMAPhrase=0;
//---- indicator buffers
double ind_buffer1[];
double ind_buffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,3);
SetIndexDrawBegin(1,SignalSMA);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1);
//---- indicator buffers mapping
if(!SetIndexBuffer(0,ind_buffer1) && !SetIndexBuffer(1,ind_buffer2))
Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("Turbo JMACD("+FastJMA+","+SlowJMA+","+SignalSMA+")");
SetIndexLabel(0,"JMAMACD");
SetIndexLabel(1,"Signal");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- macd counted in the 1-st buffer
for(int i=0; i<limit; i++)
ind_buffer1[i]= iCustom(NULL,0,"Turbo_JMA",FastJMA,FastJMAPhrase,0,i) - iCustom(NULL,0,"Turbo_JMA",SlowJMA,SlowJMAPhrase,0,i);
//ind_buffer1[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//---- signal line counted in the 2-nd buffer
for(i=0; i<limit; i++)
ind_buffer2[i]=iMAOnArray(ind_buffer1,Bars,SignalSMA,0,MODE_SMA,i);
//---- done
return(0);
}
Comments