fulltilt:
how can I prevent multiple signals in a EA?
If AO is up it should only trigger one signal at the beginning and wait until AO is below 0.0000
I'll tried this but without success :-)
if ((buysignal==true&&Trend=="buying trend") && (MA1 > MA2 + MinDistance * pips2dbl && Bid >= Open[0])) { Buy=true; } // sell condition if ((sellsignal==true&&Trend=="selling trend") && (MA1 < MA2 + MinDistance * pips2dbl && Ask <= Open[0])) { Sell=true; }
hmm, if I use == I get following error:
I use:
string Trend;
bool buysignal=true;
bool sellsignal=true;
'=' - unexpected token
why is the 2 conditions:
(buysignal==true&&Trend=="buying trend")
in parentheses
is there any other way to get it work - trigger signal only once at the beginning?
same error without parentheses:
'=' - unexpected token
or is it possible to allow new trades only for the first 2 bars of awesome indicator ?
fulltilt: how can I prevent multiple signals in a EA? If AO is up it should only trigger one signal at the beginning and wait until AO is below 0.0000 double aog = iCustom(Symbol(),0,"Awesome",1,CandleShift);//green double aor = iCustom(Symbol(),0,"Awesome",2,CandleShift);//red if (aog>0.00000) |
Don't look at for a level, look for a change in signal static double aog=0.0;
double aogPrev = aog; aog = iCustom(Symbol(),0,"Awesome",1,CandleShift);//green if (aog>0.00000 && aogPrev < 0.) |
edit ### thank you will try it
if (aog>0.00000 && aogPrev < 0.)
thank you, I added a max value ... no it works :-)
aog>0.00002 && aog<0.0006
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
how can I prevent multiple signals in a EA?
If AO is up it should only trigger one signal at the beginning and wait until AO is below 0.0000
I'll tried this but without success :-)