it compiles ok !!
mickeyferrari: , I want identify when the Price is below or above the fast and mid MA range by x pips and then draw an up
I believe I have coded it OK but can't find the glitch!!
I believe I have coded it OK but can't find the glitch!!
- What glitch? There are no mind readers here.
double slowerMAback5=iMA(NULL,0,100,0,MODE_SMA,PRICE_MEDIAN,i+5);
Your maximum look back is 100 - 1 + 5. Do your lookbacks correctly.if(Price-PipRange*pips <=MidMArange)
You said you want to identify when price is above the MA by x pips. Then code it that way. You should be able to read the code out loud and it should make reasonable good English. If it doesn't make it so.if(Price > MidMArange + PipRange*pips)
Your code makes an arrow when it is less than x pipsif(fasterMA>mediumMA && mediumMA>slowerMA && fasterMA>slowerMA)
Redundant tests.
Thanks WHRoeder for the fresh eye's

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 fellow coders,
I am stuck on this, I want identify when the Price is below or above the fast and mid MA range by x pips and then draw an up or down arrow in the direction of the trend in accordance with above if statement.
I believe I have coded it OK but can't find the glitch!!
Any help with a fix would be appreciated.
Thanks Mickey.