Send an Email if candle high or low is equal or ± ≤ 0.9 pip compare to previous.

 

Peace :)

Looking for an indicator to send an email/alert when Candle 2'  Hi/lo is equal or higher/lower not more than 0.9 pip compare to candle 1.

I was able to create the code using EAbuilder but to give the alert when candle 2 is only equal to candle 1; however I am looking for an alert when also the difference is ± ≤ 0.9 pip of previous.

Files:
 

THIS MAY HELP YOU:

SendMail Function:

Sends an email at the address specified in the settings window of the "Email" tab.

bool  SendMail( 
   string  subject,       // header 
   string  some_text      // email text 
   );

Parameters

subject

[in]  Email header.

some_text

[in]  Email body.

Return Value

true – if an email is put into the send queue, otherwise - false.

Note

Sending can be prohibited in settings, email address can be omitted as well. For the error information call GetLastError().

SendMail() function does not work in the Strategy Tester.




In order to get professional full assistance, please open a job there in freelance section:

https://www.mql5.com/en/job/new

 
Mrmoore007: I was able to create the code using EAbuilder but to give the alert when candle 2 is only equal to candle 1; however I am looking for an alert when also the difference is ± ≤ 0.9 pip of previous.
if(High[2+i] == High[1+i] //Candlestick High is equal to Candlestick High
  1. Doubles are rarely equal.
              The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum

  2. Using Points means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points,) and metals. Compute what a PIP is and use it, not points.
              How to manage JPY pairs with parameters? - MQL4 and MetaTrader 4 - MQL4 programming forum
 
whroeder1:
  1. Doubles are rarely equal.
              The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum

  2. Using Points means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points,) and metals. Compute what a PIP is and use it, not points.
              How to manage JPY pairs with parameters? - MQL4 and MetaTrader 4 - MQL4 programming forum

Isn't a pip defined only for forex?

 
Amir Yacoby: Isn't a pip defined only for forex?

Which is what the link I provided previously (№ 2.2,) showed in code (№ 2) and provided a defining link in (№ 3)

 
Mohammad Soubra:

THIS MAY HELP YOU:

SendMail Function:

Sends an email at the address specified in the settings window of the "Email" tab.

Parameters

subject

[in]  Email header.

some_text

[in]  Email body.

Return Value

true – if an email is put into the send queue, otherwise - false.

Note

Sending can be prohibited in settings, email address can be omitted as well. For the error information call GetLastError().

SendMail() function does not work in the Strategy Tester.




In order to get professional full assistance, please open a job there in freelance section:

https://www.mql5.com/en/job/new


Thank you for your help. but the code sends Email properly. I just want it a code that alerts me if the high difference is less than 1 pip. 
 
whroeder1:
  1. Doubles are rarely equal.
              The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum

  2. Using Points means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points,) and metals. Compute what a PIP is and use it, not points.
              How to manage JPY pairs with parameters? - MQL4 and MetaTrader 4 - MQL4 programming forum

Thank you for your help. It saved me additional hours of search.