Take Trade on each cross over Simple_Moving_Average........
Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!

Can anyone help me here !
KANISHKA007: I want that EA should execute buy/sell on each crossover of SMA. But I can't understand how to that, can any one help s
Look for a cross. double aPrev = …, aCurr = …, bPrev = …, bCurr = …; bool wasUp = aPrev > bPrev, isUp = aCurr > bCurr, isCross = isUp != wasUp;
Hello All,
I am asking for MT4, currently working on SMA strategy. I have coded these codes, now I want that EA should execute buy/sell on each crossover of SMA. But I can't understand how to that, can any one help so that EA take buy/sell position on every single cross over.
Please help.