Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

MA Cross Studies - MetaTrader 4 Expert | MT4 EA Download

author EAcpu | 5 reads | 0 comments |

MA Cross Studies - expert for MetaTrader 4

The purpose of creating this EA is to study the impact of various trading and money management strategies applied to a simple system, using only moving averages as deviations. With this program you can implement a moving average trading system that automatically switches between buying and selling. You can also implement a scaling strategy and choose to average up, average down, or both. You can also disable switching directions based on moving averages and just use them as deviations for opening new positions in a single direction.

There are options to set Stop Loss and Take Profit, or disable them if desired. Position sizes dynamically adjust as account balances increase or decrease, and user settings determine how much balance is used for each position. If the free equity falls below a user-defined percentage, the robot will stop placing new orders or can be configured to close all open positions. These configuration options allow the same program to be used to execute many different strategies. This EA does not use magic numbers, since it is designed to manage all trades on a given symbol.

This EA is intentionally designed so that it should not even try to hedge. If you do trade in the opposite direction of the robot, things will not turn out well at all. Manual intervention is necessary when the market takes unexpected turns or to adjust portfolio exposure. While this EA is designed to quickly explore trade management options and optimization through backtesting, it is very convenient to use it according to your preferred settings while trading.

As always, there are no promises of profit when using this program, and it's simple to configure it to throw away all your money as a paper loss. The choice to run this on a live account is your own and I sincerely hope that you test your assumptions and trading conditions on a demo account first. If you find errors in the code, please let me know and I will fix them.

MA Cross Studies - expert for MetaTrader 4

The program only evaluates whether an action should be taken at the beginning of a new bar. If you want it to check every minute, place it on a chart set to a 1-minute time frame. If you want to check weekly, set the chart time range to 1 week. This also means that backtesting "every price tick" is pointless since it will only do anything at the beginning of the bar. You should use the option of using only open bars, which will make the test go faster.


Attachment download

📎 ma_crossover.mq4 (66.54 KB)

📎 schedule.mqh (6.83 KB)

Source: MQL5 #20113

Verification code Refresh