Skip to content
All library documents

Trend Signal: Range Breakouts Adjusted by a Risk Percentage

Article MQL5 code base

Summary

This indicator identifies possible trend changes when the closing price breaks above or below adjusted boundaries derived from the highest and lowest prices over a configurable lookback period. Its two inputs are the period used to calculate the range and a risk percentage that moves each boundary inward by that share of the range.

A bullish signal occurs when the previous close is below the adjusted upper boundary and the current close moves above it. A bearish signal occurs when the previous close is above the adjusted lower boundary and the current close falls below it. The description explains the calculation but offers no trading rules beyond signal direction, parameter guidance, backtest, or evidence of profitability. Users would need to assess how lookback and risk settings affect signal frequency and false breakouts in their market and timeframe.

Key ideas

  • The indicator derives upper and lower thresholds from the highest and lowest prices over a chosen period.
  • A risk percentage shifts both thresholds inward by a percentage of the full range.
  • A close crossing above the adjusted upper threshold creates a bullish signal.
  • A close crossing below the adjusted lower threshold creates a bearish signal.
  • The document provides no performance evidence or guidance for selecting parameters.

Tags

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