Skip to content
All library documents

Trading Support and Resistance Levels with Pivot-Based Entries

Article MQL5 code base

Summary

This Expert Advisor describes a level-based strategy that opens a buy when price crosses a support level under specified bar-close and prior-bar conditions; sell entries use the opposite conditions. It places stop loss and take profit orders at support or resistance levels around the entry. If the nearest levels are too close to permit an order, it tries farther levels. A configurable option moves the stop to the entry price adjusted for spread after price reaches the first favorable level.

Parameters allow fixed lots or risk-based sizing from free funds, and can reduce lot size after losses. The target setting selects which support and resistance levels define entries and exits; an intraday option closes positions at 23:00, and email notifications are optional. The page refers to a strategy tester visual display but provides no quantified results, test settings, or evidence of robustness. It is a description of configurable trading logic, not validation that the approach is profitable; performance may depend on how levels are calculated and on market, spread, and execution conditions.

Key ideas

  • The strategy enters when price interacts with a support or resistance level under bar confirmation rules.
  • Stops and targets are assigned to nearby levels, with farther levels used when the nearest pair is too close.
  • A setting can move the stop to entry, adjusted for spread, after the first favorable level is reached.
  • Position size can be fixed or based on a maximum risk fraction, with optional reduction after losses.
  • The page provides no numerical backtest evidence or robustness analysis.

Tags

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