bool firstTime = true; if (X,y,z) { if (firstTime) { Alert("Signal"); firstTime = false; } }
Thank you very much. I will try that.
Thank you very much. I will try that.
Garfield I tried it but it does not seem to work, I am new to coding so Im sure I am doing something wrong, can you please take a look at my code and see if you can tell me what I am doing wrong...
I will post my indy with the indy's it uses.
thanx
Garfield I tried it but it does not seem to work, I am new to coding so Im sure I am doing something wrong, can you please take a look at my code and see if you can tell me what I am doing wrong...
I will post my indy with the indy's it uses.
thanx
here's the indy it uses
if you would just paste that code in your EA, it wouldnt work :D
declare firstTime as a global variable. and
put into the init() function.
Ok thank you, that works now, now all I have to figure out is why the idy signals before all the criteria are met....frustrating me a bit. ;)
Ok thank you, that works now, now all I have to figure out is why the idy signals before all the criteria are met....frustrating me a bit. ;)
AAAh Im an idiot! I had the wrong SetIndexBuffer value in the CCi 34 settings!!! it works now.
Thanks Garfield for your advice on the iterations, helped very much.
You're welcomed.
Good luck
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have written a custom indicator that puts up an alert box and play the alert sound when my criteria are met, but it makes the alert sound on every tick.
How do I make sure it only alerts me on the first signal and not on every tick.
eg:
if (X,y,z)
{
Alert("Signal")
}
how do I make sure the above example does not alert me every tick that those criteria are true but rather only the 1st time those criteria come true?
thanx