ZeroLagStochsSignals_v2

Download script
ZeroLagStochsSignals_v2

This technical indicator is designed to assist traders by identifying specific momentum shifts in the market using a specialized "Zero Lag Stochastic" calculation. Its primary purpose is to spot visual cues on a price chart that suggest potential turning points, helping users make more informed decisions on when to enter or exit positions.

Core Logic and Functionality

The script works by constantly monitoring two different data streams from an underlying "Zero Lag Stochastic" oscillator. It compares the current state of these values against their previous positions to detect "crosses"—moments where one line moves past another.

How it identifies signals:

  • Buy Signals (Green Arrows): The script looks for a specific upward crossover. When the momentum indicators shift in a way that suggests a bullish move, the tool places a green arrow below the current price candle. This serves as a visual notification that the "Zero Lag" data has crossed into a territory favoring a potential upward trend.
  • Sell Signals (Red Arrows): Conversely, when the data indicates a downward shift in momentum, the script identifies a bearish crossover. It then places a red arrow above the price candle to signal a potential move toward lower prices.

User Experience and Notifications

To ensure the trader doesn't have to watch the screen constantly, the tool includes an integrated alert system.

  • Visual Feedback: The indicator plots arrows directly on your trading chart, making it easy to see historical signals at a glance.
  • Real-Time Alerts: Depending on your settings, the script can trigger an instant pop-up notification on your screen whenever a new signal occurs. This tells you the specific currency pair and timeframe where the "Zero Lag" crossover happened, allowing for faster reaction times during live market sessions.

Summary for Traders

In essence, this tool acts as an automated scout. It does the heavy lifting of calculating complex momentum math in the background and translates that data into simple visual instructions: green arrows for potential buying opportunities and red arrows for potential selling opportunities.

Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screen
11 Views
0 Downloads
0 Favorites
ZeroLagStochsSignals_v2
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 LimeGreen
#property indicator_color2 Red
//---- input parameters
extern int a=14;
extern int alerty=0;  // 0 for alerts 1 for no alerts
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double b4zls,nowzls,nowzlsmain;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW,EMPTY);
SetIndexArrow(0,233);
SetIndexBuffer(0, ExtMapBuffer1);

SetIndexStyle(1,DRAW_ARROW,EMPTY);
SetIndexArrow(1,234);
SetIndexBuffer(1, ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//ObjectDelete(""); 
//ObjectDelete("down cross"); 
//ObjectDelete(0,233);
//ObjectDeleteEx(0, DRAW_ARROW,0,0,0);

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
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=1000-counted_bars;
//---- macd counted in the 1-st buffer

 for(int i=limit; i>=0; i--)
{  
   b4zls=iCustom(NULL,0,"ZeroLagStochs",0,i+1);
      
   nowzls=iCustom(NULL,0,"ZeroLagStochs",0,i);
   nowzlsmain=iCustom(NULL,0,"ZeroLagStochs",1,i);
 
 if(b4zls>nowzlsmain &&
         nowzls<nowzlsmain)
    
          {
            ExtMapBuffer2[i]=High[i]+7*Point;
      if (alerty==0 && i<2 ) Alert(Symbol()," ",Period()," ZeroLagStochs Cross SELL");
         }
 
    if(b4zls<nowzlsmain &&
         nowzls>nowzlsmain)
       {
            ExtMapBuffer1[i]=Low[i]-5*Point;
        if (alerty==0 && i<2) Alert(Symbol()," ",Period()," ZeroLagStochs Cross BUY");
       }
}
//----
return(0);
}

Comments