Download MetaTrader 5

Indicators: MAM_Crossover

To add comments, please log in or register
Are you a good trader? Become a signals provider and make even more money!
MetaQuotes Software Corp.
Moderator
181359
MetaQuotes Software Corp. 2010.11.09 12:31 

MAM_Crossover:

The Crossover Moving Average Mirror user, completed with Sound Alert.

Author: andy tjatur

Valera
70
Valera 2010.11.09 19:49  
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);
---------------------------------------------------------------------------
MQL4 Comments
16319
MQL4 Comments 2010.11.13 19:41  

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.

andy tjatur
8
andy tjatur 2010.11.15 02:48  

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

MQL4 Comments
16319
MQL4 Comments 2010.11.20 10:19  

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.


MQL4 Comments
16319
MQL4 Comments 2010.11.22 10:22  

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




MQL4 Comments
16319
MQL4 Comments 2010.11.22 10:25  

I have also found that the sound alert is not working. Is anyone facing same problem?


Regards

Mayank Saini

MQL4 Comments
16319
MQL4 Comments 2010.11.22 11:24  

Hi pramono,

Is this crossover indicator based on your MACD mirror. I put both the indicators on same chart to see whether they use same technique or not but buy/sell of both indicators are different.


Regards

Mayank Saini

To add comments, please log in or register