Sanju Trend Keeper
- エキスパート
- バージョン: 1.1
- アクティベーション: 5
Sanju Trend Keeper — Version 1.01
Original MetaTrader 5 Expert Advisor by Sanju Suresh. A completed-bar trend-following system that enters confirmed trends and tries to hold them with a wide, ratcheting ATR stop. No grid, martingale, loss averaging or escalating lot sequence.
Rules
On the signal timeframe (default H4, independent of the chart timeframe, so it can be attached to H1 or D1 charts), a long requires EMA 20 above EMA 50 above EMA 100, the last completed close above EMA 20, a close above the prior 20-bar high, and ADX(14) at least 22.
Shorts are the mirror image. Decisions are taken once per new signal bar from completed bars only. One own position per symbol unless optional pyramiding is enabled.
Initial stop is 3.0 x ATR(14). There is no fixed take profit. A chandelier trail (22-bar extreme minus/plus 3.5 x ATR) only ever moves the stop in the profitable direction, only when it improves by at least 0.25 x ATR, and at most once per signal bar. Stop, freeze and spread distances are checked before every modification and a move is deferred rather than attempted when too close to the market.
Optional pyramiding is OFF by default: at most 2 adds, each only when every own position already has its stop at break-even or better and price has advanced 1.5 x ATR; adds use half the risk budget. It never adds to a losing position.
Position sizing and safeguards
Default equity risk target is 0.5% (1% hard cap on the modelled loss). OrderCalcProfit models the stop loss including requested slippage and volume is rounded down. If even the minimum lot exceeds that budget, a new entry is still taken at the minimum lot ONLY when its modelled stop loss is at most MaxMinLotRiskPct (default 2.0%) of equity; otherwise the trade is skipped and logged. This means that on small balances an individual trade can risk more than 0.5% (up to the 2% cap, and slippage, gaps or costs can make a loss larger). Set MaxMinLotRiskPct to 0 to never force the minimum lot.
OrderCalcMargin limits new margin to 20% of free margin and requires projected margin level of at least 300%. Spread must not exceed 10% of ATR. Trade mode, session, volume limits and tick size are checked.
A 3% account-equity loss from the first observation of the server day halts new entries and adds until the next day; protected positions are kept by default (optional flatten input). This is not a guarantee of a maximum daily loss.
On netting accounts, any other position or order on the symbol blocks entry. On hedging accounts, unrelated tickets are not touched. Use a unique magic number and do not share a netted symbol with another system.
Actual baseline results — version 1.01, unchanged defaults
MT5 Every tick based on real ticks (100% real ticks), JustMarkets-Demo2, USD 10,000, leverage 1:100, hedging account, 2025-11-01 through 2026-11-01 exclusive (last available tick 2026-10-30), strategy timeframe H4.
EURUSD.m: net -24.05 USD; profit factor 0.93; maximal equity drawdown 234.22 USD (2.34%); 21 trades (7 winners). A small loss.
XAUUSD.m: net +1,539.57 USD; profit factor 3.71; maximal equity drawdown 562.60 USD (4.79%); 22 trades (13 winners). All 22 entries used the 0.01 minimum lot, whose modelled stop loss was roughly USD 90 (about 0.9% of equity), above the 0.5% target.
This is a single 12-month window in which gold trended strongly; it is not evidence of a robust or repeatable edge, and trend systems commonly have long losing stretches. No parameter optimisation or selected winning preset was used. Broker data, spreads and execution materially affect results.
Local checks and practical use
Local netting checks (1-minute OHLC, same 12 months): EURUSD H1 chart with USD 1,000 traded 21 times with no error lines (+1.86 USD); XAUUSD D1 chart with USD 10,000 traded 22 times (+1,546.76 USD); XAUUSD D1 chart with USD 1,000 did NOT trade, because the minimum lot would risk about 9% of equity, above the 2% cap. Gold therefore needs a materially larger balance than a small demo account. These checks are not official MQL5 Market validation or approval.
Start on demo, keep risk at 0.5% or lower, and do not raise risk to recover losses. USD 10,000 was a test condition, not a recommended minimum or capital level.
Risk warning — no guarantees
Trading can lose capital. Historical simulation does not guarantee future results. Stop losses, margin checks and the daily halt do not guarantee a maximum realised loss or prevent all stop-outs. Gaps, slippage, commission (not included in the sizing model), spread changes, session closures, other account trades and execution failure can cause losses beyond the modelled thresholds. No live forward results are claimed. Demo-test and independently assess suitability before live use.
