Skip to content
All library documents

Moving Average Signals from the Current Bar’s Open and MA Values

Article MQL5 code base

Summary

This MetaTrader expert advisor generates buy and sell signals by comparing the current bar’s open price with moving average values from the current and preceding bars. It evaluates the conditions on every tick. When a signal appears in a direction that already has an open position, the advisor ignores it; an opposite signal closes the existing position. The method therefore uses moving average comparisons both to initiate directional exposure and to reverse or exit it.

The description does not specify the exact comparison rules, moving average period, applied price, position size, stop-loss, or take-profit settings. It also provides no tests or performance results, so it does not establish whether the approach is profitable or robust. Because signals are checked on every tick while referencing the current bar, implementation and intrabar behavior matter when evaluating the strategy.

Key ideas

  • The advisor compares the current bar’s open with moving average values from two bars.
  • It checks for signals on every tick.
  • A signal is ignored when a position in that direction is already open.
  • An opposite signal closes the existing position.
  • The description gives no parameter settings or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.