Skip to content
All library documents

A Level-Based Expert Advisor That Reverses on Opposite Signals

Article MQL5 code base

Summary

The document describes an expert advisor that trades support and resistance levels drawn by a user with trendline tools. The trader indicates the intended direction graphically, and the advisor opens a position when price crosses the configured level. If a signal from another level points the other way, it reverses the existing trade.

It outlines two modes: trading a move away from a level, where crossing direction depends on whether price began above or below it, and trading the crossing itself, which uses the opposite entry logic. Level colors indicate angle, while a thin level signals that its arrow settings are incompatible; a horizontal level is created by repositioning its second handle. The description gives operational rules but no performance evidence, risk controls, asset-specific guidance, or backtest results, so it does not establish profitability or robustness.

Key ideas

  • The advisor uses trader-drawn support and resistance levels as entry signals.
  • The trader selects each level's direction with graphical arrows.
  • An opposing signal from another level causes the advisor to reverse the position.
  • The two modes apply opposite entry logic when price crosses a level.
  • Level appearance indicates angle or invalid arrow settings, and handle placement can make a level horizontal.

Tags

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