Alert Once (Brain Damage)!

 

Hi folks,

Please give this aerticle a look and tell me what do you think? :

http://www.metatrader.info/node/173

 

Nice article. A lot of people asking this question.

U can use the following code to make it easier.

void AlertOnce(string alert_msg, int ref)

{

if (ref > 10)

return;

ref--;

static int LastAlert[10];

if( LastAlert[ref] == 0 || LastAlert[ref] < Bars)

{

Alert(alert_msg);

LastAlert[ref] = Bars;

}

}

 

Great code!

elihayun:
Nice article. A lot of people asking this question.

U can use the following code to make it easier.

void AlertOnce(string alert_msg, int ref)

{

if (ref > 10)

return;

ref--;

static int LastAlert[10];

if( LastAlert[ref] == 0 || LastAlert[ref] < Bars)

{

Alert(alert_msg);

LastAlert[ref] = Bars;

}

}

Thank you very much for reading the artilce!

Your code looks very great I have to give it a try!

A good programmer is the programmer who uses less lines of code and your code seems a good code!

 

Thanks for the help, CG!!

 

Great!

Great and very useful article...