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

Expert Advisor based on Price_Extreme_Indicator - Expert Advisor for MetaTrader 5

author EAcpu | 4 reads | 0 comments |

Expert Advisor based on Price_Extreme_Indicator - expert for MetaTrader 5

Expert Advisor based on Price_Extreme_Indicator - expert for MetaTrader 5

The Expert Advisor is based on the Channel Indicator Price_Extreme_Indicator .

The strategy is simple:

If the above conditions are met, a position is opened on each new bar. If a buy signal occurs and there is an open sell position, the position will be closed and a buy position opened. The opposite is true for sell signals.

The Expert Advisor allows enabling/disabling long/short trading as well as reversing indicator signals to open a sell position instead of a buy position and vice versa. You can also set Stop Loss and Take Profit (in points). If invalid StopLoss and TakeProfit values ​​are specified, the EA will adjust these values ​​to the minimum allowed symbol of the StopLoss level .

If the lot size is invalid, the EA will adjust it to a suitable value. If the lot size is too large, the EA will adjust it to be able to open a position. If there are no funds to open a position even with the minimum lot size, the signal will be skipped.

Please note that in order to function correctly, the EA requires the compiled indicator file Price_Extreme_Indicator . Please also note that the Expert Advisor is intended for training and strategy testing purposes.

The EA has 11 configurable parameters:

In order to check this strategy, a test with default settings was conducted using data from the interval 2017.01.02 to 2018.01.19. Unfortunately, in this mode (trading channel breakout) the Expert Advisor loses the deposit at the very beginning of the testing period. Then test it with the reverse signal. Got the following result:

Expert Advisor based on Price_Extreme_Indicator - expert for MetaTrader 5

Expert Advisor based on Price_Extreme_Indicator - expert for MetaTrader 5

M5 period, test interval: 2017.01.02 - 2018.01.19

All parameters except reverse are set to default values ​​(reverse trade == "yes")

Test charts show that the EA is highly dependent on the market state (trending/flat). In this test, the EA trades inward from the channel borders. Stable profit/loss areas are clearly visible. When trading within a channel, the EA takes profits in flat areas. But once the trend starts, trading within the channel becomes unprofitable. Therefore, the strategy can be developed further: the EA should trade within the channel during flat periods and on channel breakouts in the direction of the trend during trending periods.


Attachment download

📎 price_extreme_indicator.mq5 (5.28 KB)

📎 price_extreme_strategy.mq5 (33.91 KB)

Source: MQL5 #19818

Verification code Refresh