Author: Sidus
Sidus

The Sidus v.2 Entry Indicator is a technical analysis tool designed to assist traders in identifying high-probability entry points by analyzing market trends and momentum. It simplifies the complexities of price action by combining three primary financial metrics into a cohesive visual signal on your trading chart.

Core Logic Overview

The script functions by monitoring the relationship between two different types of moving averages and a momentum oscillator. Its primary objective is to detect "crossovers"—moments where the market sentiment shifts from bearish (downward) to bullish (upward), or vice versa.

Key Components of the Analysis

  • Moving Average Tracking: The tool calculates two "Exponential Moving Averages" (EMA). By comparing a faster-moving average against a slower one, the script determines the current trend's strength. When the faster line sits above the slower line, it suggests upward momentum; when below, it suggests downward pressure.
  • Momentum Filtering (RSI): To ensure that the trend is strong enough to act upon, the script utilizes the Relative Strength Index (RSI). This acts as a confirmation layer. For an upward signal to be valid, the RSI must be above a specific midpoint, ensuring that the move has sufficient "push" behind it.
  • Signal Synthesis: The logic creates a "signal" based on these combined factors:
    • Bullish Signal: Occurs when the fast average is higher than the slow average AND the momentum (RSI) is in the upper half of its range.
    • Bearish Signal: Occurs when the fast average is lower than the slow average AND the momentum (RSI) is in the lower half of its range.

Entry Execution and Visuals

The script is programmed to look for a specific transition: a complete flip from a Bearish signal to a Bullish signal (or the reverse).

  1. Visual Markers: Once a valid trend reversal is detected, the indicator places visual arrows on the chart. These markers appear slightly below or above the price candles to clearly highlight where a potential entry occurred.
  2. Alert System: For active trading, the tool can be configured to provide real-time notifications. If enabled, the script will trigger an audible sound and display a pop-up message box on your screen, explicitly stating whether to "Buy" or "Sell" along with the specific price point at which the signal occurred.

Summary for the User

Essentially, this indicator filters out market noise by requiring multiple conditions to be met simultaneously. It avoids "fakeouts" by ensuring that a trend shift isn't just a minor fluctuation, but a confirmed movement supported by both moving average positioning and momentum strength.

Indicators Used
Moving average indicatorRelative strength index
Miscellaneous
Implements a curve of type %1It plays sound alertsIt opens Message Boxes to the user
7 Views
0 Downloads
0 Favorites
Sidus
//+------------------------------------------------------------------+
//|                                    Sidus v.2 Entry Indicator.mq4 |
//|                                                                  |
//|                                                   Ideas by Sidus |
//+------------------------------------------------------------------+
#property copyright "Sidus"
#property link      ""

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 DodgerBlue

#include <WinUser32.mqh>
//---- input parameters
extern int       FastEMA=14;
extern int       SlowEMA=21;
extern int       RSIPeriod=17;
extern bool      Alerts=false;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//double rsi_sig[];
//---- variables
int sigCurrent=0;
int sigPrevious=0;
double pipdiffCurrent=0;
double pipdiffPrevious=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,1,3);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(2,DRAW_ARROW,1,5);
   SetIndexArrow(2,233);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexEmptyValue(2,0.0);
   SetIndexStyle(3,DRAW_ARROW,1,5);
   SetIndexArrow(3,234);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexEmptyValue(3,0.0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int limit;
   int counted_bars=IndicatorCounted();
   double rsi_sig=0;
   bool entry=false;
   double entry_point=0;
   
   //---- check for possible errors
   if(counted_bars<0) return(-1);
   //---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;

   //---- main loop
   for(int i=0; i<limit; i++)
   {
     //---- ma_shift set to 0 because SetIndexShift called abowe
     ExtMapBuffer1[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i);
     ExtMapBuffer2[i]=iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
     rsi_sig = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, i);
     
     pipdiffCurrent=(ExtMapBuffer1[i]-ExtMapBuffer2[i]);

     Comment("pipdiffCurrent = "+pipdiffCurrent+" ");
     if (pipdiffCurrent>0 && rsi_sig>50) 
     {
       sigCurrent = 1;  //Up
     }
     else if (pipdiffCurrent<0 && rsi_sig<50)
     {
       sigCurrent = 2;  //Down
     }
/*
     if (pipdiffCurrent>0) 
     {
       sigCurrent = 1;  //Up
     }
     else if (pipdiffCurrent<0)
     {
       sigCurrent = 2;  //Down
     }
*/     

     if (sigCurrent==1 && sigPrevious==2)
     {
        ExtMapBuffer4[i-1] = High[i-1]-5*Point;
        //ExtMapBuffer3[i] = Ask;
        entry=true;
        entry_point=Ask;
     } 
     else if (sigCurrent==2 && sigPrevious==1)
     {
        ExtMapBuffer3[i-1] = Low[i-1]-5*Point;
        //ExtMapBuffer4[i] = Bid;
        entry=true;
        entry_point=Bid;
     }


     sigPrevious=sigCurrent;
     pipdiffPrevious=pipdiffCurrent;
   }

   //----
   if(Alerts && entry)
   {
     PlaySound("alert.wav");
     if (sigPrevious==1)
     {
        MessageBox("Entry point: buy at "+entry_point+"!!", "Entry Point", MB_OK);
     }
     else if (sigPrevious==2)
     {
        MessageBox("Entry point: sell at "+entry_point+"!!", "Entry Point", MB_OK);
     }

     entry=false;
   }
RefreshRates();

//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments