HELP WITH ALERT "BID"

 
I DON'T UNDERSTAND WHY MY LINE ISN'T WORKING.
WHEN IT IS ACTUALLY HAPPENING NOTHING IS GOING ON.
FOR E.G. WHEN IN REAL TIME BID IS 1.1265 NOTHING IS HAPENING!!!
I NOTICED THAT BID IS IN RED COLOR IN METAEDITOR.

PLEASE HELP!!


int init()
{
//----



if(Symbol()!="USDCHFm,h1")
if(Bid > 1.1264)
Alert(" sell usd/chf ", " ");


}



return(0);
 

Change

if(Symbol()!="USDCHFm,h1")
if(Bid > 1.1264)
Alert(" sell usd/chf ", " ");

to

if(Symbol()=="USDCHFm")
if(Period() == PERIOD_H1)
if(Bid > 1.1264)
Alert(" sell usd/chf ", " ");

 
ok i'll try.


thanks
 
no,it is not working.
there is no alert message when change has actually happened.



help please!!
 

You code seems to be in the init() section.

If it is, move or copy it to the start() section.

 
thank's it work's.

do you know how to stop expert adwisor when condition is true.?

i mean disable when once hit.
i wonder if there is a code line for that?


thanks
 

static bool StopRunningEA = false;

start(){

if(StopRunningEA== true) return(0);

... your EA code here

if( Some condition is true) {
StopRunningEA = true;
return(0); // if you want instant exit
}
... Maybe more EA code here...

return(0);

}

Reason: