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

Brandy - MetaTrader 4 Expert | MT4 EA Download - MetaTrader 4 Resources

author EAcpu | 3 reads | 0 comments |

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Expert Advisor uses two moving averages: slow MA - for receiving entry signals, fast MA - for exit signals.

That's it! And there are no intricacies, no moving average crossovers, etc. :)

This is the optimization result from July 2007 to July 2008.

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

Any optimization will display profitable images. But how does an EA trade in optimized ranges, periods it knows nothing about?

Let's try to perform a three-month forward test - testing over the time interval from July 2008 to today (the second half of October). This resulted in an optimized test interval of three and a half months.

Brandy - expert for MetaTrader 4

Brandy - expert for MetaTrader 4

It can be seen that the EA is still profitable after more than three months of optimization.

Parameters to be optimized:

p1, p2 - calculates the average period of the moving average. Optimize using values ​​from 2 to 100 in steps of 1.

s1, s2 - moves backward by the specified number of periods relative to the current bar. Values ​​range from 2 to 20 in steps of 1.

sl - stop loss for the opened position. Optimize using values ​​from 10 to 100 in steps of 5.

ts - maintain open positions with trailing stops. Optimize using values ​​from 100 to 200 in steps of 5.

If ts is less than 100, trailing is disabled. This is done so that trailing does not interfere with EA operation, but rather as a safety measure. For example, if the connection is lost, the EA cannot close the position by itself.

To disable trailing, set the value of the ts variable to less than 100. For example, ts = 0 - disable trailing.

When a new bar appears, the EA starts working. Therefore, the optimization should be performed according to the model: "Only the opening price (the fastest way to analyze the just completed bar, only for EAs that explicitly control the opening of the bar)".

Attachment: The EA in the source code is not optimized.


Attachment download

📎 Brandy_v1_2.mq4 (3.82 KB)

Source: MQL5 #8508

Verification code Refresh