Question: How you can get the MA value if i=0? (are you looking into the future?) -------------------------------------------------------------------------- for(i = 0; i <= limit; i++) { ..... E=iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,i-1); F=iMA(NULL,0,20,0,MODE_SMA,PRICE_OPEN,i-1); ---------------------------------------------------------------------------
I have often seen this type of coding, where the For loop begins with i=0 and then later we see i-1 in the body of the loop.
This appears to be an obvious error.
How can this code compile successfully, let alone execute.
dear val77 & michael b,
thanks for your concern, i use i-1 in to avoid bias indicator. I will be glad if you have an alternative to improve my crossover.
rgds
Thankyou very much! Is it an ordinary MA crossover or something else? and what values you are using. We can better use it if values and indicator is known.
Thankyou promono!
Can we add to this indicator that it only gives signal where the trend is. Like if I am trading 15m chart it gives me buy signal only in uptrend and sell signal only in downtrend. This indicator can be profitable if we can stay away from non trending markets, so can we add something that in choppy market it does not give signal. Please assist in improving.
Regards
I have also found that the sound alert is not working. Is anyone facing same problem?
Regards
Mayank Saini

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
MAM_Crossover:
Author: andy tjatur