I don't know where did you get this indicator but this one is a poor modification of 5/8 EMA Crossover indicator. Look for the original in forexfactory.com in Trading System forum and compare it with yours. You'll know how to get rid of all those redundant arrows.
Use a flag:
static int direction = 0; // 1 = buy signal active, -1 = sell signal active if (ali1>ali2 && direction != 1) { direction = 1; buySignal[i] = Low[i+1] - displacement; if (enableAlert == true && i == 0) SignalAlert("Buy signal On: "); } if (ali1<ali2 && direction != -1) { direction = -1; sellSignal[i] = High[i+1] + displacement; if (enableAlert == true && i == 0) SignalAlert("Sell signal On: "); }
phy:
it works................thanksssssssssssssssssssss
Use a flag:
static int direction = 0; // 1 = buy signal active, -1 = sell signal active if (ali1>ali2 && direction != 1) { direction = 1; buySignal[i] = Low[i+1] - displacement; if (enableAlert == true && i == 0) SignalAlert("Buy signal On: "); } if (ali1<ali2 && direction != -1) { direction = -1; sellSignal[i] = High[i+1] + displacement; if (enableAlert == true && i == 0) SignalAlert("Sell signal On: "); }
Yup.

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
iam new in this mql4 i want a code prevent appearing the repeated signal
if my indicator gave buy signal i find lots of buy signals i just want one signal buy and when the indicator
gives sell sungnal i want one signal ;;; i know i can make it crossing the lines but i want the code
to use it in any indicators in future