Fisher_exit
Download scriptThis automated trading tool is designed to act as a visual signaling system on your price charts, specifically intended to identify potential reversal points or "exit" opportunities. It operates by analyzing the momentum and trend behavior of the market through a secondary calculation known as the Fisher Transform.
How it Works
The script monitors the movement of the market's momentum in real-time. Rather than looking at raw price alone, it analyzes how fast and in what direction the price is moving. It specifically looks for "peaks" and "valleys" in this momentum—essentially identifying moments where a strong move starts to exhaust itself and pivot in the opposite direction.
The Signaling Logic
The tool provides two distinct types of signals, visually represented on your chart:
- Sell/Short Signals: The script identifies a situation where the upward momentum has reached a peak and begins to turn downward. When the momentum "curves" back from a high point, the tool places a visual marker at the low point of that specific candle. This suggests that the buying pressure may be fading.
- Buy/Long Signals: Conversely, the script monitors for downward momentum reaching a bottom point. When the momentum "curves" upward from a low point, it places a visual marker at the high point of that candle, suggesting that selling pressure may be exhausted and a move upward could be commencing.
Visual Summary
Instead of cluttering your screen with continuous lines, this script remains clean by only displaying specific markers (arrows or dots) at the exact moments its mathematical conditions are met. This allows traders to quickly scan historical data to see where momentum shifts occurred or to receive real-time alerts on when the market's "push" is potentially losing steam.
//+------------------------------------------------------------------+
//| 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