Traditional moving average crossover strategies are prone to frequent false signals in ranging markets, making drawdowns difficult to control. The core concept of this strategy is that a trend is only deemed valid—and thus worthy of opening a position—when the moving average exhibits a sufficiently steep, one-sided trend.
The strategy is based on the Simple Moving Average (SMA), calculating the difference between the current SMA value and the value from a specified period ago, and converting the rate of change of the SMA into an intuitive angle using the inverse tangent function. The greater the absolute value of the angle, the stronger the directionality of the trend and the smoother the market movement;
an angle close to 0 indicates a ranging market, in which case the strategy actively refrains from trading. Additionally, a price-to-moving-average deviation indicator is introduced, measuring the degree of price deviation relative to the moving average as a percentage, thereby mitigating the risk of chasing prices at the tail end of a trend when entering the market.
The strategy employs a new candlestick trigger mechanism, performing signal evaluation only once at the close of each candlestick to avoid interference from intraday noise. Opening a position requires the simultaneous fulfilment of three conditions:
Strategy stop-loss levels are adjusted in stages as market conditions evolve, with the core objective being to preserve unrealised profits and let profits run. Four tiers of stop-loss protection are set throughout the holding period:
The strategy utilises a built-in local SQLite database via MT5’s native interface to automatically and persistently record every position opening and stop-loss adjustment event. Each record contains comprehensive information including the event time, trade direction, lot size, price, moving average value,
angle, deviation, stop-loss price and account equity, among other comprehensive details. This provides a more complete set of data than the terminal’s native logs, facilitating subsequent strategy review, parameter optimisation and performance attribution.
Overall, this is a trend-following EA with clear logic and well-defined risk management tiers. Its core returns stem from smooth, one-way market movements; it avoids sideways movements through angle filtering, controls entry timing via deviation, and utilises dynamic
stop-losses to protect profits. Parameters can be adjusted according to the volatility characteristics of different instruments to suit various trading timeframes.
Translated from Chinese by MetaQuotes Ltd.
Original code: /zh/code/74379
Hidden Risk of Ruin Auditor
Reads a closed-position trade history (a CSV file, or one generated automatically from the current account's deal history by the companion RuinExport.mq5 script) and reports four independent risk fingerprints: volume escalation after a loss, overlapping same-direction exposure that averages into a worse price, payoff asymmetry between wins and losses, and a classical risk-of-ruin estimate at a stated risk per trade. The four scores combine into a single A-to-F grade with plain-language recommendations. If no CSV is found, the script generates a reproducible demonstration book automatically, so the report is visible on the first run.
Smart Trend Score
Smart Trend Score is a clean and lightweight MetaTrader 5 indicator designed to identify high-quality trading opportunities using multiple trend and momentum filters.
SimpleTradeStats
Statistics on closed trades. The indicator shows trading results, filtered by magic number.
Channel Sun Signals
Overview Channel Sun Signals plots an adaptive, triangular-weighted moving-average channel (a center line plus an upper and lower band) around price, and marks potential reversal points where price pierces a band and then closes back inside it. It is built on the same "band-break-then-reversal" logic used by classic TMA/CG-style channel indicators, but rewritten natively for MT5 — including its own multi-timeframe engine that does not rely on iCustom() or an external .ex5 file, so the indicator works standalone once compiled.