Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Expert Advisor | Averaging By Signal

MetaTrader Experts, Indicators, Scripts and Libraries

This EA is made with an example of crossing MA as an entry signal.
This EA was created for the purpose of learning MQL4 code.

Every order that is opened will use a different magicnumber according to each pair. You can see how this EA manages different magicnumber.

The ManageOrders() function will set the opening of new orders and averaging according to signal or without signal based only on the minimum distance between layers.

The setTPSLMarti() function can set TP for 1 position or multiple orders at the same TP price.

The setTrailingStop() function is used to set the trailing stop at 1 position of the initial order.

for information and group sharing, please join t.me/codeMQL

34466