Author of the Idea: Vladimir Khlystov
MQ5 Code Author: barabashkakvn
Welcome, fellow traders! Today, I’m excited to share a straightforward Expert Advisor (EA) that effectively utilizes two popular indicators: the Moving Average (MA) and the Moving Average Convergence Divergence (MACD). This EA is designed to open only one position at a time, making it compatible with both hedging and netting accounts.
So, how does it work? The EA begins by identifying a signal bar. When a new bar (#0) forms, it checks if the MACD indicator from the previous bar (#1) crosses the zero line. A crossover indicates that we have our signal bar. Here’s an example of a signal SELL bar:

Once a signal bar is identified, the EA will record the High and Low prices of that bar and wait for the price to break through one of these levels. For a SELL signal, if the price breaks below the Low of the bar, the EA will open a SELL position.

Conversely, if the price breaks above the High, it resets the SELL signal. This simple yet effective strategy can help you navigate the markets with confidence.
Comments 0