RAVI FX Fisher_v3
Download scriptThe RAVI FX Fisher is a custom technical analysis tool designed to help traders visualize and interpret market momentum by identifying the strength and direction of price movements. Instead of looking at raw price action, this indicator transforms complex data into a simplified visual signal that oscillates between specific boundaries.
How the Logic Works
The script operates by analyzing the relationship between two different moving averages: a "fast" moving average (which reacts quickly to recent price changes) and a "slow" moving average (which represents the broader trend). By comparing these two, the tool determines whether the current market sentiment is leaning toward growth or decline.
To ensure the data remains relevant regardless of how volatile or stable the market is at any given moment, the logic incorporates an Average True Range (ATR) calculation. This acts as a balancing mechanism, normalizing the movements so that the indicator provides consistent readings during both high-activity periods and quiet market sessions.
Visual Interpretation
The core logic processes these calculations into a specialized formula that produces a value between -1 and 1. Here is how to interpret the results on your chart:
- Momentum Calculation: The script calculates a "value" based on the gap between the fast and slow trends, adjusted for volatility.
- The Fisher Transformation: It then applies a mathematical transformation (an exponential function) to this value. This converts the raw trend data into an oscillator that is easier for human eyes to read quickly.
- Trigger Boundaries: The indicator provides two horizontal boundaries (the "triggers"). When the moving line approaches or crosses these levels, it signifies that the momentum is reaching a peak or a trough, potentially indicating a shift in market direction.
Summary of Benefits
By smoothing out market "noise" and normalizing volatility, this tool allows traders to see the underlying strength of a trend. It helps identify when a move has become overextended or when a new trend is gaining significant steam, providing a clearer picture of market dynamics than standard price charts alone.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| RAVI FX Fisher.mq4 |
//| Copyright © 2005, Luis Guilherme Damiani |
//| http://www.damianifx.com.br |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Luis Guilherme Damiani"
#property link "http://www.damianifx.com.br"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 MediumSeaGreen
#property indicator_color2 MediumVioletRed
#property indicator_color3 MediumVioletRed
//---- input parameters
extern int MAfast=4;
extern int MAslow=49;
extern double trigger=0.07;
extern int maxbars=500;
//---- buffers
double RAVIfxFishBuffer[];
double LoTrigBuff[];
double HiTrigBuff[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,RAVIfxFishBuffer);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,LoTrigBuff);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,HiTrigBuff);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
double MAValue=0;
double IFish=0;
//---- check for possible errors
if(counted_bars<0) return(-1);
int limit=Bars-counted_bars;
if(limit>maxbars)limit=maxbars;
if (limit>Bars-MAslow-1)limit=Bars-MAslow-1;
//----
for (int shift = 0; shift<=limit;shift++)
{
//if period >70 then {LoTrigger=-0.15;HiTrigger=0.15;}else {LoTrigger=-0.07;HiTrigger=0.07;};
MAValue = 100 * (iMA(NULL,0,MAfast,0,MODE_LWMA,PRICE_TYPICAL,shift) - iMA(NULL,0,MAslow,0,MODE_LWMA,PRICE_TYPICAL,shift))*iATR(NULL,0,MAfast,shift)
/iMA(NULL,0,MAslow,0,MODE_LWMA,PRICE_TYPICAL,shift)/iATR(NULL,0,MAslow,shift);
IFish=(MathExp(2*MAValue)-1)/(MathExp(2*MAValue)+1);
RAVIfxFishBuffer[shift]=IFish;
LoTrigBuff[shift]=-trigger;
HiTrigBuff[shift]=trigger;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments