.

Re: Indicators with alerts/signals

#1491
Hercs wrote:
Tue Apr 17, 2018 12:29 am
Hercs wrote:
Sun Apr 15, 2018 10:51 pm

Thank you kindly, MrTools.
Good morning MrTools,
Trust you had a great weekend and looking forward to summer.
May I please ask you for 3 cosmetic changes to this latest change you made seeing that you posted the ex4 file which I understand fully: ( I cannot therefore upload the indicator)
a. Arrows visible
b. Arrows style 225/226
c. Arrows colours - White for UP and Orange to stay for DOWN.

Sorry for adding to your load with such a small request, but it is "painful" to have to do all the corrections all the time.
Best wishes,
That version I meant to post the source code.
Attachments
!_Zerolag ema wpr histo alerts arrows.mq4
(9.2 KiB) Downloaded 287 times


Re: Indicators with alerts/signals

#1493
Mr.Tools !!! Thank you very much, you are DA MAN

Keep on rocking @ forex-station.com

-simon


mrtools wrote:
Tue Apr 17, 2018 3:39 am
simon_n3z wrote:
Tue Apr 17, 2018 2:15 am



Esteemed mr.Tools ..... xP ...

please would you be so kind to add alerts to this indicator... it would really help me with my trading.

The usual will be ok, (at bar close, alert, push and email). and maybe arrows on chart..

Thank you in advance

-simon


ps: keep on rocking
Added the alerts.

Re: Indicators with alerts/signals

#1494
chirvasamar wrote:
Sun Apr 15, 2018 3:00 am
mrtools wrote:
Sat Apr 14, 2018 5:30 pm


Transferred the alerts from the alert version to the mtf version.
Starchild77
Did you test it/use it in real trading ?
History looks almost Holy Grail, but I've tested in MT4 tester and looks like drawing arrows 3-4 bars back; means useless......
Hi...Just checked again...The indicator does not repaint however, it gives the signal a bit too late when using MTF hence, after testing, it seems to be on a loss side....Thanks

Re: Indicators with alerts/signals

#1495
mrtools wrote:
Tue Apr 17, 2018 3:30 am
Hercs wrote:
Tue Apr 17, 2018 12:29 am


Good morning MrTools,
Trust you had a great weekend and looking forward to summer.
May I please ask you for 3 cosmetic changes to this latest change you made seeing that you posted the ex4 file which I understand fully: ( I cannot therefore upload the indicator)
a. Arrows visible
b. Arrows style 225/226
c. Arrows colours - White for UP and Orange to stay for DOWN.

Sorry for adding to your load with such a small request, but it is "painful" to have to do all the corrections all the time.
Best wishes,
That version I meant to post the source code.
Good morning MrTools,
Thanking you most sincerely.
Best wishes.


Re: Indicators with alerts/signals

#1496
One last request (and quite a simple one ;) if mr.Tools would accommodate please ... <3

I would like the regular RSI indicator to give alerts. But give alerts on a reversal after breaking levels and than reversing
Alert on open bar would be very important for me this time

example:

int levelOB = 70;
if ( RSIhigh > 70 && RSIhigh > RSI[0] ) {Alert(reversal - SELL);}

I hope you can understand...let me know if it is unclear...

Greetz to everyone in this fine place

-simon

ps: keep rocking at forex-station.com <3 <3 <3

Code: Select all

//+------------------------------------------------------------------+
//|                                                          RSI.mq4 |
//|                   Copyright 2005-2014, MetaQuotes Software Corp. |
//|                                              http://www.mql4.com |
//+------------------------------------------------------------------+
#property copyright   "2005-2014, MetaQuotes Software Corp."
#property link        "http://www.mql4.com"
#property description "Relative Strength Index"
#property strict

#property indicator_separate_window
#property indicator_minimum    0
#property indicator_maximum    100
#property indicator_buffers    1
#property indicator_color1     DodgerBlue
#property indicator_level1     30.0
#property indicator_level2     70.0
#property indicator_levelcolor clrSilver
#property indicator_levelstyle STYLE_DOT
//--- input parameters
input int InpRSIPeriod=14; // RSI Period
//--- buffers
double ExtRSIBuffer[];
double ExtPosBuffer[];
double ExtNegBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit(void)
  {
   string short_name;
//--- 2 additional buffers are used for counting.
   IndicatorBuffers(3);
   SetIndexBuffer(1,ExtPosBuffer);
   SetIndexBuffer(2,ExtNegBuffer);
//--- indicator line
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtRSIBuffer);
//--- name for DataWindow and indicator subwindow label
   short_name="RSI("+string(InpRSIPeriod)+")";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);
//--- check for input
   if(InpRSIPeriod<2)
     {
      Print("Incorrect value for input variable InpRSIPeriod = ",InpRSIPeriod);
      return(INIT_FAILED);
     }
//---
   SetIndexDrawBegin(0,InpRSIPeriod);
//--- initialization done
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Relative Strength Index                                          |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   int    i,pos;
   double diff;
//---
   if(Bars<=InpRSIPeriod || InpRSIPeriod<2)
      return(0);
//--- counting from 0 to rates_total
   ArraySetAsSeries(ExtRSIBuffer,false);
   ArraySetAsSeries(ExtPosBuffer,false);
   ArraySetAsSeries(ExtNegBuffer,false);
   ArraySetAsSeries(close,false);
//--- preliminary calculations
   pos=prev_calculated-1;
   if(pos<=InpRSIPeriod)
     {
      //--- first RSIPeriod values of the indicator are not calculated
      ExtRSIBuffer[0]=0.0;
      ExtPosBuffer[0]=0.0;
      ExtNegBuffer[0]=0.0;
      double sump=0.0;
      double sumn=0.0;
      for(i=1; i<=InpRSIPeriod; i++)
        {
         ExtRSIBuffer[i]=0.0;
         ExtPosBuffer[i]=0.0;
         ExtNegBuffer[i]=0.0;
         diff=close[i]-close[i-1];
         if(diff>0)
            sump+=diff;
         else
            sumn-=diff;
        }
      //--- calculate first visible value
      ExtPosBuffer[InpRSIPeriod]=sump/InpRSIPeriod;
      ExtNegBuffer[InpRSIPeriod]=sumn/InpRSIPeriod;
      if(ExtNegBuffer[InpRSIPeriod]!=0.0)
         ExtRSIBuffer[InpRSIPeriod]=100.0-(100.0/(1.0+ExtPosBuffer[InpRSIPeriod]/ExtNegBuffer[InpRSIPeriod]));
      else
        {
         if(ExtPosBuffer[InpRSIPeriod]!=0.0)
            ExtRSIBuffer[InpRSIPeriod]=100.0;
         else
            ExtRSIBuffer[InpRSIPeriod]=50.0;
        }
      //--- prepare the position value for main calculation
      pos=InpRSIPeriod+1;
     }
//--- the main loop of calculations
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      diff=close[i]-close[i-1];
      ExtPosBuffer[i]=(ExtPosBuffer[i-1]*(InpRSIPeriod-1)+(diff>0.0?diff:0.0))/InpRSIPeriod;
      ExtNegBuffer[i]=(ExtNegBuffer[i-1]*(InpRSIPeriod-1)+(diff<0.0?-diff:0.0))/InpRSIPeriod;
      if(ExtNegBuffer[i]!=0.0)
         ExtRSIBuffer[i]=100.0-100.0/(1+ExtPosBuffer[i]/ExtNegBuffer[i]);
      else
        {
         if(ExtPosBuffer[i]!=0.0)
            ExtRSIBuffer[i]=100.0;
         else
            ExtRSIBuffer[i]=50.0;
        }
     }
//---
   return(rates_total);
  }
//+------------------------------------------------------------------+

Re: Indicators with alerts/signals

#1497
simon_n3z wrote:
Wed Apr 18, 2018 3:07 am
One last request (and quite a simple one ;) if mr.Tools would accommodate please ... <3

I would like the regular RSI indicator to give alerts. But give alerts on a reversal after breaking levels and than reversing
Alert on open bar would be very important for me this time

example:

int levelOB = 70;
if ( RSIhigh > 70 && RSIhigh > RSI[0] ) {Alert(reversal - SELL);}

I hope you can understand...let me know if it is unclear...

Greetz to everyone in this fine place

-simon

ps: keep rocking at forex-station.com <3 <3 <3

Code: Select all

//+------------------------------------------------------------------+
//|                                                          RSI.mq4 |
//|                   Copyright 2005-2014, MetaQuotes Software Corp. |
//|                                              http://www.mql4.com |
//+------------------------------------------------------------------+
#property copyright   "2005-2014, MetaQuotes Software Corp."
#property link        "http://www.mql4.com"
#property description "Relative Strength Index"
#property strict

#property indicator_separate_window
#property indicator_minimum    0
#property indicator_maximum    100
#property indicator_buffers    1
#property indicator_color1     DodgerBlue
#property indicator_level1     30.0
#property indicator_level2     70.0
#property indicator_levelcolor clrSilver
#property indicator_levelstyle STYLE_DOT
//--- input parameters
input int InpRSIPeriod=14; // RSI Period
//--- buffers
double ExtRSIBuffer[];
double ExtPosBuffer[];
double ExtNegBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit(void)
  {
   string short_name;
//--- 2 additional buffers are used for counting.
   IndicatorBuffers(3);
   SetIndexBuffer(1,ExtPosBuffer);
   SetIndexBuffer(2,ExtNegBuffer);
//--- indicator line
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtRSIBuffer);
//--- name for DataWindow and indicator subwindow label
   short_name="RSI("+string(InpRSIPeriod)+")";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);
//--- check for input
   if(InpRSIPeriod<2)
     {
      Print("Incorrect value for input variable InpRSIPeriod = ",InpRSIPeriod);
      return(INIT_FAILED);
     }
//---
   SetIndexDrawBegin(0,InpRSIPeriod);
//--- initialization done
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Relative Strength Index                                          |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   int    i,pos;
   double diff;
//---
   if(Bars<=InpRSIPeriod || InpRSIPeriod<2)
      return(0);
//--- counting from 0 to rates_total
   ArraySetAsSeries(ExtRSIBuffer,false);
   ArraySetAsSeries(ExtPosBuffer,false);
   ArraySetAsSeries(ExtNegBuffer,false);
   ArraySetAsSeries(close,false);
//--- preliminary calculations
   pos=prev_calculated-1;
   if(pos<=InpRSIPeriod)
     {
      //--- first RSIPeriod values of the indicator are not calculated
      ExtRSIBuffer[0]=0.0;
      ExtPosBuffer[0]=0.0;
      ExtNegBuffer[0]=0.0;
      double sump=0.0;
      double sumn=0.0;
      for(i=1; i<=InpRSIPeriod; i++)
        {
         ExtRSIBuffer[i]=0.0;
         ExtPosBuffer[i]=0.0;
         ExtNegBuffer[i]=0.0;
         diff=close[i]-close[i-1];
         if(diff>0)
            sump+=diff;
         else
            sumn-=diff;
        }
      //--- calculate first visible value
      ExtPosBuffer[InpRSIPeriod]=sump/InpRSIPeriod;
      ExtNegBuffer[InpRSIPeriod]=sumn/InpRSIPeriod;
      if(ExtNegBuffer[InpRSIPeriod]!=0.0)
         ExtRSIBuffer[InpRSIPeriod]=100.0-(100.0/(1.0+ExtPosBuffer[InpRSIPeriod]/ExtNegBuffer[InpRSIPeriod]));
      else
        {
         if(ExtPosBuffer[InpRSIPeriod]!=0.0)
            ExtRSIBuffer[InpRSIPeriod]=100.0;
         else
            ExtRSIBuffer[InpRSIPeriod]=50.0;
        }
      //--- prepare the position value for main calculation
      pos=InpRSIPeriod+1;
     }
//--- the main loop of calculations
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      diff=close[i]-close[i-1];
      ExtPosBuffer[i]=(ExtPosBuffer[i-1]*(InpRSIPeriod-1)+(diff>0.0?diff:0.0))/InpRSIPeriod;
      ExtNegBuffer[i]=(ExtNegBuffer[i-1]*(InpRSIPeriod-1)+(diff<0.0?-diff:0.0))/InpRSIPeriod;
      if(ExtNegBuffer[i]!=0.0)
         ExtRSIBuffer[i]=100.0-100.0/(1+ExtPosBuffer[i]/ExtNegBuffer[i]);
      else
        {
         if(ExtPosBuffer[i]!=0.0)
            ExtRSIBuffer[i]=100.0;
         else
            ExtRSIBuffer[i]=50.0;
        }
     }
//---
   return(rates_total);
  }
//+------------------------------------------------------------------+
Have this older version, that draws arrows and sounds alerts on entering and or exiting the ob/os zones.
Attachments
RSI - alerts - 2_1.ex4
(55.34 KiB) Downloaded 391 times
rsi alert enter exit.png

Re: Indicators with alerts/signals

#1500
cc06 wrote:
Sun Apr 22, 2018 2:15 pm
Hi MrTools,

Found this indicator is Great. Need your help to add a push and email alert when both the signal turn "UPSTRONG and BUYSTRONG" to buy and "DOWNSTRONG and SELLSTRONG" to sell.

If possible add in the input to key in current pairs to monitor. If to difficult, the alert will do.

Thanks a lot again !!!
Would need the original version, that is a decompiled version.


Who is online

Users browsing this forum: alozard, emicovi, Google [Bot], JAMIL, mades, nrv, Pava, pawel.kowalski, pin12, tutank and 48 guests