Expert Advisor and Indicator

 

Hello,

Would You help me find a way to:

Read with Expert Advisor a Alerts?

Best Regards

 
SzyTob:

Hello,

Would You help me find a way to:

Read with Expert Advisor a Alerts?

Best Regards

not sure exactly what you mean here but i'll take a guess...you want to be able to get some specific alert with use of function Alert() somewhere in your code right?

Alert("my alert text goes here...");
 

Indeed,

Indicator set alert.

I wish get alert with ea.


How to do it? (in mql4 ;/)

 
SzyTob:

Indeed,

Indicator set alert.

I wish get alert with ea.


How to do it? (in mql4 ;/)

i have answered that already...

use function

Alert();
 

Kenneth I see that Alert(); have a void type.

So what you talking about?!

It return nothing.

 
SzyTob:

Kenneth I see that Alert(); have a void type.

So what you talking about?!

It return nothing.

of course it does not return anything unless you make it...why don't you start learning about the functions instead!

Alert("it's time to buy on symbol EURUSD");

You need to insert the text you want to be alerted about and use this function somewhere in your code to get it working for you

 

too high an abstract level for me ;/

I don't get it at this moment..

 

@Kenneth Parling look at attachment.


so in EA.mq4 what should I do? O.o 
Could You help me? I wish learn something new.


if(Alert(7777))

{

do1();

}

if(Alert(6666))

{

do2();

}

Files:
Screenshot_3.jpg  245 kb
 
SzyTob:

@Kenneth Parling look at attachment.


so in EA.mq4 what should I do? O.o 
Could You help me? I wish learn something new.


if(Alert(7777))

{

do1();

}

if(Alert(6666))

{

do2();

}

you got things completely backwards.....

//example of alert usage
//This example shows an rsi signal giving alerts


void RsiSignal()
 {
  double rsi = iRSI(Symbol(),PERIOD_CURRENT,14,PRICE_CLOSE,1)

  if(rsi>=70)
    Alert("Rsi is equal or above level 70");
  if(rsi<=30)
    Alert("Rsi is equal or below level 30");
 }
 

@Kenneth Parling


On chart indicator make for me alerts.

I need read this alerts in EA.


Your code generate new once or I am moron as .....

-.-

 
SzyTob:

@Kenneth Parling


On chart indicator make for me alerts.

I need read this alerts in EA.


Your code generate new once or I am moron as ....

-.-

to read values from indicators and use in ea as entry signals you need to work with iCustom  

Alert("...") function does what it's suppose to do - give alerts, in tester it prints out the text alert, in trading mode on chart you get a popup message and got nothing to with reading indicator values

Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
[in]  The name of the custom indicator, with path relative to the root directory of indicators (MQL5/Indicators/). If an indicator is located in a subdirectory, for example, in MQL5/Indicators/ [in] input-parameters of a custom indicator, separated by commas. Type and order of parameters must match. If there is no parameters specified, then...