Fisher_org_v12_v3
Download scriptThis tool is designed to help traders identify momentum and potential trend reversals by analyzing price movements through a specialized mathematical lens. Instead of just looking at raw price data, it transforms these fluctuations into a smoother, more readable visual signal that highlights when the market is reaching extreme conditions.
Core Functionality
The logic operates by comparing current price action against historical highs and lows over a specific period. It essentially "normalizes" the market behavior to see where the current price sits relative to its recent range. By doing this, the tool can distinguish between standard market noise and significant shifts in momentum.
Key Components of the Logic:
- Dynamic Range Analysis: The script identifies the highest and lowest price points reached during a specific lookback period. It then calculates where the current price sits within that high-low boundary.
- Weighted Smoothing: To prevent the data from being too erratic or "jittery," the tool applies a weighted smoothing process. This ensures that the resulting line reflects a consistent trend rather than reacting impulsively to every minor tick in the market.
- The Fisher Transformation: The core of this script is a mathematical transformation that converts the smoothed price data into a different scale. This transformation is specifically designed to make it easier to spot "overbought" or "oversold" conditions, as it expands the visual representation of extremes.
- Signal and Trigger Lines: The logic produces two distinct lines on the chart:
- The Main Momentum Line (Fish): This represents the primary transformed price action.
- The Trigger Line: This acts as a secondary reference point based on previous data, helping traders identify specific moments where momentum might be shifting or crossing a threshold.
How It Assists Traders
By translating complex price fluctuations into a smoothed, transformed line, this script allows users to see the "pulse" of the market more clearly. When the values reach extreme levels or cross the trigger thresholds, it provides a visual cue that the current trend may be losing steam or reaching a turning point, helping traders make more informed decisions on potential entry and exit points.
//+------------------------------------------------------------------+
//| Fisher_org_v1.mq4 |
//| Copyright © 2006, TrendLaboratory Ltd. |
//| http://finance.groups.yahoo.com/group/TrendLaboratory |
//| E-mail: igorad2004@list.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, TrendLaboratory Ltd."
#property link "http://finance.groups.yahoo.com/group/TrendLaboratory"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int Length = 10;
extern int Price = 4;
extern int NumBars = 0;
//---- buffers
double Buffer[];
double Value [];
double Fisher[];
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(3);
//----
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
//----
SetIndexBuffer(0,Buffer);
SetIndexBuffer(1,Fisher);
SetIndexBuffer(2,Value);
//----
IndicatorShortName ("FisherTransform(" + Length + "," + Price + ")");
SetIndexLabel (0, "Fish");
SetIndexLabel (1, "Trigger");
//----
SetIndexDrawBegin(0,Length);
SetIndexDrawBegin(1,Length);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Fisher_org_v1 |
//+------------------------------------------------------------------+
int start()
{
int shift;
double smin = 0, smax = 0;
//----
if(NumBars > 0)
int NBars = NumBars;
else
NBars = Bars;
//----
for(shift = NBars; shift >= 0; shift--)
{
Buffer[shift] = 0.0;
Value [shift] = 0.0;
Fisher[shift] = 0.0;
}
//----
for(shift = NBars - 2 - Length; shift >= 0; shift--)
{
smax = High[Highest(NULL, 0, MODE_HIGH, Length, shift)];
smin = Low[Lowest(NULL, 0, MODE_LOW, Length, shift)];
double price = iMA(NULL, 0, 1, 0, 0, Price, shift);
//----
if(smax == smin)
smax = smin + Point;
double wpr = (price - smin) / (smax - smin);
Value[shift] = (wpr - 0.5) + 0.67*Value[shift+1];
//----
if(Value[shift] > 0.99)
Value[shift] = 0.999;
//----
if(Value[shift] < -0.99)
Value[shift] = -0.999;
Fisher[shift] = 0.5*MathLog((1.0 + Value[shift]) / (1.0 - Value[shift])) +
0.5*Fisher[shift+1];
Buffer[shift] = Fisher[shift+1];
}
return(0);
}
//+------------------------------------------------------------------+
Comments