phy wrote >>
if(Moving21P<Moving21 && Moving21P>Moving21)BuySignal=True;
What does that line say?
if(Moving21>PMoving21 && Moving21<PMoving21)SellSignal=True;
This one too...
You are right those lines does not mean anything at all....
In fact I am trying to reproduce that:
if(Open[2]<Moving21P && Open[1]>Moving21)BuySignal=True; else BuySignal=false; if(Open[2]>Moving21P && Open[1]<Moving21)SellSignal=True; else SellSignal=false;
if Open price shift 2 is below MA shift 2, and Open price shift 1 is above MA shift 1 --> Open long position
if Open price shift 2 is above MA shift 2, and Open price shift 1 is below MA shift 1 --> Open short position
Is there something I need to correct here ? The EA does not trade with this code.
Thx,
MovingAverage
Your correction looks ok.
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
Hi all,
For some reason this formula is not working....
I know there is problem with the way I have set the trading conditions, but really cant understand what's wrong there.
if(Moving21P<Moving21 && Moving21P>Moving21)BuySignal=True; else BuySignal=false; if(Moving21>PMoving21 && Moving21<PMoving21)SellSignal=True; else SellSignal=false;When i use instead the following conditions it work....
But that's not produce the results I want. Why this work and not the original formula above ???
Can anyone help ?
Many Thx.
MovingAverage