Fisher_exit_v1
Download scriptThe Fisher_exit indicator is a specialized visual tool designed to help traders identify specific "turning points" in market momentum. Instead of showing a continuous line like many traditional indicators, this script focuses exclusively on pinpointing moments where a trend might be exhausting or reversing, providing clear signals for potential exits from a position.
How the Logic Works
The core engine of this tool relies on the Fisher Transform, a mathematical calculation used to identify price cycles and trends. The script analyzes two specific components of this transform: the upward momentum and the downward momentum.
By evaluating the relationship between the current price action and the previous two bars, the logic looks for "peak" and "valley" formations in the momentum flow:
- Sell/Exit Signals (Bearish Reversal): The script monitors the upward momentum component. It looks for a specific pattern where the momentum was rising, reached a high point, and has started to drop. When this "mountain peak" shape is detected in the data, the indicator places a visual marker on the chart to suggest that the upward move may be losing steam.
- Buy/Exit Signals (Bullish Reversal): Conversely, the script monitors the downward momentum component. It searches for a scenario where the downward pressure reached its lowest point and has begun to turn back upward. When this "valley" shape appears, the indicator marks the high of that bar to suggest that the downward move may be ending.
Visual Presentation
To keep the trading workspace clean and easy to read, the indicator does not clutter the screen with extra lines or complex data tables. Instead:
- It places distinct arrows (or markers) directly on your main price chart.
- Blue markers highlight potential bullish turning points.
- Red markers highlight potential bearish turning points.
Summary for the Trader
This tool acts as a "momentum alert" system. Its primary purpose is to filter out the noise of a moving market and highlight specific moments where the internal force of a trend has shifted. By identifying these structural shifts in the Fisher Transform, it provides traders with objective visual cues to consider taking profits or closing out trades before a trend fully reverses.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| Fisher_exit.mq4 |
//| Kalenzo |
//| simone@konto.pl |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link "simone@konto.pl"
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
double exitL[],exitS[];
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW,EMPTY,1);
SetIndexStyle(1,DRAW_ARROW,EMPTY,1);
SetIndexBuffer(0,exitL);
SetIndexBuffer(1,exitS);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) counted_bars=0;
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//----
for(int i = 0 ;i < limit ;i++)
{
double f1u = iCustom(Symbol(),0,"Fisher_v1",10,4,0,0,i);//up
double f2u = iCustom(Symbol(),0,"Fisher_v1",10,4,0,0,i+1);//up
double f3u = iCustom(Symbol(),0,"Fisher_v1",10,4,0,0,i+2);//up
double f1d = iCustom(Symbol(),0,"Fisher_v1",10,4,0,1,i);//dn
double f2d = iCustom(Symbol(),0,"Fisher_v1",10,4,0,1,i+1);//dn
double f3d = iCustom(Symbol(),0,"Fisher_v1",10,4,0,1,i+2);//dn
if(f1u < f2u && f2u > f3u)
{
exitL[i] = Low[i];
exitS[i] = 0.0;
}
else if(f1d > f2d && f2d < f3d)
{
exitS[i] = High[i];
exitL[i] = 0.0;
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments