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.
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?
bool firstTime = true;
firstTime = false;
Thank you very much. I will try that.
if you would just paste that code in your EA, it wouldnt work :D
declare firstTime as a global variable. and
firstTime = true;
put into the init() function.
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.
here's the indy it uses
and this one
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.