I need an Expert Advisor for MetaTrader 5.
It needs to be based on MACD histogram signals across multiple timeframes on multiple currency pairs.
General Notes
· MACD histogram = MACD – Signal
· Only one trade is opened at a time for each currency pair.
· Trade signals are only produced at the end of a bar, not “intra-bar”.
· User needs to be able to optimise the Input Parameters (detailed below) using the Strategy Tester.
Opening positions
· Open a long trade when one or a combination of the following signal conditions (to be selected by the user) are met:
o MACD histogram (5min) > 0
o MACD histogram (15min) > 0
o MACD histogram (30min) > 0
o MACD histogram (1hr) > 0
o MACD histogram (4hr) > 0
o MACD histogram (1day) > 0
o MACD histogram (1week) > 0
o MACD histogram (5min) is increasing (ie. current bar is greater than previous bar)
o MACD histogram (15min) is increasing
o MACD histogram (30min) is increasing
o MACD histogram (1hr) is increasing
o MACD histogram (4hr) is increasing
o MACD histogram (1day) is increasing
o MACD histogram (1week) is increasing
· Open a short trade when one or a combination of the following signal conditions (to be selected by the user) are met:
o MACD histogram (5min) < 0
o MACD histogram (15min) < 0
o MACD histogram (30min) < 0
o MACD histogram (1hr) < 0
o MACD histogram (4hr) < 0
o MACD histogram (1day) < 0
o MACD histogram (1week) < 0
o MACD histogram (5min) is decreasing (ie. current bar is less than previous bar)
o MACD histogram (15min) is decreasing
o MACD histogram (30min) is decreasing
o MACD histogram (1hr) is decreasing
o MACD histogram (4hr) is decreasing
o MACD histogram (1day) is decreasing
o MACD histogram (1week) is decreasing
Closing positions
There are three ways a trade can be closed:
· The Signal conditions to close a trade are met (detailed below)
· A “Take Profit” level is hit (user to input level in points)
· A “Stop Loss” level is hit (user to input level in points)
· Close a long trade when one or a combination of the following signal conditions (to be selected by the user) are met:
o MACD histogram (5min) < 0
o MACD histogram (15min) < 0
o MACD histogram (30min) < 0
o MACD histogram (1hr) < 0
o MACD histogram (4hr) < 0
o MACD histogram (1day) < 0
o MACD histogram (1week) < 0
o MACD histogram (5min) is decreasing
o MACD histogram (15min) is decreasing
o MACD histogram (30min) is decreasing
o MACD histogram (1hr) is decreasing
o MACD histogram (4hr) is decreasing
o MACD histogram (1day) is decreasing
o MACD histogram (1week) is decreasing
· Close a short trade when one or a combination of the following signal conditions (to be selected by the user) are met:
o MACD histogram (5min) > 0
o MACD histogram (15min) > 0
o MACD histogram (30min) > 0
o MACD histogram (1hr) > 0
o MACD histogram (4hr) > 0
o MACD histogram (1day) > 0
o MACD histogram (1week) > 0
o MACD histogram (5min) is increasing
o MACD histogram (15min) is increasing
o MACD histogram (30min) is increasing
o MACD histogram (1hr) is increasing
o MACD histogram (4hr) is increasing
o MACD histogram (1day) is increasing
o MACD histogram (1week) is increasing