Building Expert Advisors Around Semaphore Indicator Signals
Summary
This article presents a reusable expert advisor design for trading indicators that mark entry or exit signals on a chart. It uses an ASCtrend example: the advisor reads upper and lower indicator buffers on a selected timeframe and bar, then maps those readings to permitted long or short entries and exits. Inputs control position sizing or fixed lot use, stop loss, take profit, price deviation, signal bar, and whether each side may open or close. The code also checks for new bars and tracks signal times to avoid repeating same-direction trades within a bar.
The author extends the pattern to related signal and trend indicators, noting that signal retrieval can differ while much of the advisor logic remains reusable. The article supplies code and implementation notes, but no backtest results establishing profitability. Indicators may repaint or behave differently, and the examples do not establish robustness across markets, timeframes, or execution conditions. Risk controls and empirical validation remain the user's responsibility.
Key ideas
- Semaphore indicators encode potential entries or exits as values that an expert advisor can read from indicator buffers.
- A selected timeframe and bar index determine which indicator reading drives the trade logic.
- Separate permissions control long and short entries and signal-based exits, alongside stops, targets, and sizing inputs.
- New-bar detection and stored signal times help manage when the advisor evaluates and repeats trades.
- The design can be adapted to similar indicators, but the article supplies no performance evidence for the strategy.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.