![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I do not know why but there is no crossing of moving average and it gives an opinion in buy and in more the market goes down
Hi danu, thank you for the comment. Could you post your EA setting, pair and time frame, and your broker, I will check the EA ? Again thank you in advance![](https://c.mql5.com/forextsd/smiles/smile.png)
hello firedave is mt4 with north finance, moving average 10 - 40 in 1h euro today at 8h30 am
Hi Dave,
When you have a spare 15 minutes, would you explain in greater detail how the third moving average is supposed to function. I would like to learn more about this strategy, but I and my engineer brother are confused on how it is supposed to work with entry and exit, likewise the option countertrend. Any chance you could explain it using a graph presentation. One picture is worth a thousand words, beyond simple explanation. I just know that if we are slightly confused, others are also. Your help is so greatly appreciated!!
Problems in Testing
MinCrossDistance / MaxLookUp is not working and alarm is not working in EA(Alarm did not work when crossover buys and sells occured in version 2 of EA also).
I have tested these features with various settings, and time periods all yesterday and both fail to work. Note: I added the crossover gap variable values to the graph display as well as the MA's values - Easier to test EA out. Please evaluate what the problem may be. Hopefully you can find a fix for these problems soon. I have attached a one minute graph showing there is no buy or sell in crossover activating on the graph.
Dave
<
Guys, I got HDD crash today, so still trying to recover all back up. Will get back to you guys next week or ASAP. Sorry for the delay response. Hope this help![](https://c.mql5.com/forextsd/smiles/smile.png)
That is a bummer FireDave.
What I have done this morning, as you are down right now, is send your program to my programmer I use to see if he can troubleshoot this MaxLookUp problem. I believe in your program and it is worth spending a few bucks to get the kinks out of it and get it making money. I still would like for you to explain step-by-step how the third moving average is supposed to function, along with the countertrend option. It may be easy for you to understand, but I could use some clarification.
Good luck on your computer - They can be a royal pain. I use those 1 GB flash memory sticks to backup my data and programs. They are easy to use and you can purchase them from www.tigerdirect.com for $24.95 plus shipping. I look forward to hearing from you in the near future. Have a nice weekend and try to relax and unwind!
Dave
<Changing only work in H4
Hi Dave, I want to change your EA so it will only work in h4 time frame.
So in meta editor i changed it like this:
//----------------------- GLOBAL VARIABLE
static int
TimeFrame = 240;
string
TicketComment = "UniversalMACrossEA v7",
LastTrade,
LastAlert,
TradeDirection = "NONE";
datetime
CheckTime,
CheckEntryTime,
CrossTime;
//----------------------- PREVENT RE-COUNTING WHILE USER CHANGING TIME FRAME
//----------------------- SOURCE : CODERSGURU
TimeFrame=240;
return(0);
}
Am I made mistake by changing like that? I don't understand because never learned language program before and it tell no error when compiling process finished.
Thanks for your concern! And thanks for the people that help me to answer this question!![](https://c.mql5.com/forextsd/smiles/regular_smile.png)
Hi Dave, I want to change your EA so it will only work in h4 time frame.
So in meta editor i changed it like this:
//----------------------- GLOBAL VARIABLE
static int
TimeFrame = 240;
string
TicketComment = "UniversalMACrossEA v7",
LastTrade,
LastAlert,
TradeDirection = "NONE";
datetime
CheckTime,
CheckEntryTime,
CrossTime;
//----------------------- PREVENT RE-COUNTING WHILE USER CHANGING TIME FRAME
//----------------------- SOURCE : CODERSGURU
TimeFrame=240;
return(0);
}
Am I made mistake by changing like that? I don't understand because never learned language program before and it tell no error when compiling process finished.
Thanks for your concern! And thanks for the people that help me to answer this question!Hi surya, I think that should do the trick. Let me know if you still got any problem with it. Hope this help![](https://c.mql5.com/forextsd/smiles/smile.png)
MinCrossDistance / MaxLookUp is not working and alarm is not working in EA(Alarm did not work when crossover buys and sells occured in version 2 of EA also).
I have tested these features with various settings, and time periods all yesterday and both fail to work. Note: I added the crossover gap variable values to the graph display as well as the MA's values - Easier to test EA out. Please evaluate what the problem may be. Hopefully you can find a fix for these problems soon. I have attached a one minute graph showing there is no buy or sell in crossover activating on the graph.
Dave
<Hi Dave, I tried to fix the problem, please check the fixed EA on post #1 and let me know if the problem still occur. Hope this help![](https://c.mql5.com/forextsd/smiles/smile.png)
Hi Dave,
When you have a spare 15 minutes, would you explain in greater detail how the third moving average is supposed to function. I would like to learn more about this strategy, but I and my engineer brother are confused on how it is supposed to work with entry and exit, likewise the option countertrend. Any chance you could explain it using a graph presentation. One picture is worth a thousand words, beyond simple explanation. I just know that if we are slightly confused, others are also. Your help is so greatly appreciated!!
Hi Dave, here is a picture with some explanation.
1. ThirdMA will act like a additional filter, if you set UseThirdMA = TRUE. If UseCounterTrend = FALSE, then the EA will only BUY if the cross of FirstMA and SecondMA is above the ThirMA, and will only SELL if the cross of FirstMA and SecondMA is below the ThirMA.
2. If UseCounterTrend = TRUE, the EA will trade any cross, regardless it's above or below ThirdMA, but if there is SELL above ThirdMA or BUY below ThirMA, it will use CTStopLoss and CTTakeProfit as the SL and TP.
3. If OnlyCounterTrend = TRUE, then the EA will only trade a counter trend signal, mean only BUY if below ThirdMA and SELL if above the ThirdMA (opposite from number #1)
Please let me know if you still confuse. Hope this help![](https://c.mql5.com/forextsd/smiles/smile.png)