ZeroLagStochsSignals
Download scriptThis tool is designed to assist traders by identifying specific momentum shifts in the market through visual signals and automated notifications. It functions by analyzing a specialized technical indicator called the "ZeroLagStochastics."
How it Works
The script continuously monitors the price movement of your chosen currency pair or asset. Instead of looking at the raw price alone, it interprets the data from the ZeroLagStochastics indicator to detect when different components of that indicator cross paths.
- Buy Signals: When the logic detects a specific upward crossover (where the preceding momentum value is lower than the current main value), the tool places a blue arrow below the candle. This suggests a potential "Buy" opportunity.
- Sell Signals: Conversely, when the logic detects a downward crossover (where the preceding momentum value is higher than the current main value), the tool places a red arrow above the candle. This suggests a potential "Sell" opportunity.
Automated Alerts
Beyond just visual cues on the chart, the script is equipped with a multi-channel notification system to ensure you don't miss key movements:
- Visual Cues: It draws clear arrows directly on your trading screen at the exact moment the crossover occurs.
- Audio Alerts: It can trigger an audible sound ("timeout.wav") to grab your attention immediately.
- Pop-up Notifications: An on-screen alert will display the specific pair and timeframe where the signal occurred.
- Email Notifications: If enabled in the settings, the script can automatically send an email to your registered device, allowing you to stay updated even when you are away from your trading terminal.
Customization
The tool provides a few key settings to tailor the experience to your preference:
- Sensitivity: You can adjust the primary period of the underlying calculation.
- Alert Control: You can toggle the audible and pop-up alerts on or off.
- Email Settings: You can choose whether or not you want to receive automated emails for every signal generated.
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int a=14;
extern int alerty=0; // 0 for alerts 1 for no alerts
extern bool UseSendMail = true;
//---- 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");
PlaySound("timeout.wav");
if (UseSendMail == true) SendMail(" ZeroLagStochs Cross SELL "+Symbol(),"");
}
}
if(b4zls<nowzlsmain &&
nowzls>nowzlsmain)
{
ExtMapBuffer1[i]=Low[i]-5*Point;
if (alerty==0 && i<2) {
Alert(Symbol()," ",Period()," ZeroLagStochs Cross BUY");
PlaySound("timeout.wav");
if (UseSendMail == true) SendMail(" ZeroLagStochs Cross BUY "+Symbol(),"");
}
}
}
//----
return(0);
}
Comments