Experts: Using Moving Averages with an EA (Sample Source Code)

 

Using Moving Averages with an EA (Sample Source Code):

This time, we're providing a sample that enters based on the Golden Cross and Dead Cross of the moving averages. If you want to see a sample where a long entry is made when the closing price of the candlestick crosses above the moving average, please refer to this article.

Using Moving Averages with an EA (Sample Source Code)

Author: Lo Thi Mai Loan

 
I've gone through the code and it looks fantastic. Thanks for the job even though I hoped it was mql5.
 
George Effanga #:
I've gone through the code and it looks fantastic. Thanks for the job even though I hoped it was mql5.

Thanks. This code is quite clear, you can convert it to MQ5 very easily

 

Thanks for your efforts and excellent EA

Does your EA execute trades automatically once it is installed and activated on Meta Trader 4? 

 
miarajas #: Thanks for your efforts and excellent EA. Does your EA execute trades automatically once it is installed and activated on Meta Trader 4? 

Yes. You install it into MT4 and EM will automatically trade In addition, you can customize the code to your liking for further optimization.

 
Thanks for your code sharing! With optimizations it would work well on all instruments
 
I'm learning MQL4, this is a great help, thank you.

I would like to make a control panel adding buttons to start and stop the automatic trading as well as a field to set the lots and few other parameters.

Would you be kind to share some code showing how create such objects?

I'm not asking you to modify your EA, some simple code example would be enough, I will then try to implement the functions in your code.

 
diegobincoletto #:

I would like to make a control panel adding buttons to start and stop the automatic trading as well as a field to set the lots and few other parameters.

Would you be kind to share some code showing how create such objects?

I'm not asking you to modify your EA, some simple code example would be enough, I will then try to implement the functions in your code.

there is a few good examples in your terminal navigator that you can use. There is also some great examples in the codebase.