Skip to content
All library documents

Heiken Ashi Smoothed Oscillator Signals with Trailing and Reversal Options

Article MQL5 code base

Summary

This document outlines an Expert Advisor that uses a Heiken Ashi Smoothed Oscillator to generate buy and sell entries. It evaluates entry signals when a new bar appears, while checking trailing stops on each tick. The EA includes settings to enable trailing, reverse the interpretation of signals, and decide whether a new signal closes positions in the opposite direction.

The position-handling choice affects exposure: allowing multiple positions can close opposing trades when a signal arrives, while the alternative keeps only one market position. The note also mentions that commented moving-average and indicator setup code is retained for adaptation, and refers to example optimization ranges for hourly charts without providing them in the text. It supplies no backtest results or risk analysis, so the signal rules and trade-management options are described without evidence of performance.

Key ideas

  • Entries are triggered by oscillator signals at the start of a new bar.
  • Trailing stop checks occur on every tick, and trailing can be disabled.
  • A reversal setting switches the direction assigned to each signal.
  • An opposite-position setting controls whether opposing trades close and whether multiple positions are allowed.
  • The document gives no performance results for the Expert Advisor.

Tags

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