Risk Guard Prop

  • Uzmanlar
  • Amul Ravikumar
    Amul Ravikumar
    • Founder · MT5 / Full-stack Developer at  Brain Grain
    • Hindistan
    • 304
    MT5 / MQL5 developer. I build indicators, Expert Advisors and utility scripts from a written spec: every rule as an input, compiled with 0 errors and 0 warnings, and verified in the Strategy Tester before handover. Recent: a custom MT5 indicator delivered with a 5-star review. Local MT5 + MetaEditor
  • Sürüm: 1.4
  • Etkinleştirmeler: 5
Risk Guard Prop is not a trading strategy. It never opens a position on a live or demo account. Attach it to one chart per account and it watches every position on the account — your manual trades and any other Expert Advisor — and enforces the rules you set. When a rule is hit it closes what is open, blocks new positions (they are closed the moment they appear), tells you why, and keeps the lock through a terminal restart.

It is built for prop-firm challenges and funded accounts, where one bad day ends the account, and for anyone who wants their own rules enforced by code rather than by willpower.

RULES — every one is an input and can be switched off

1. Daily loss limit. Money or a percent of the start-of-day balance (or equity). Counts closed P/L since server midnight plus floating P/L. Lock lasts until the next server day.
2. Weekly loss limit. Percent of the start-of-week balance. Lock lasts until Monday.
3. Maximum drawdown. Static from the initial balance, or trailing from the equity high-water mark — the two shapes prop firms use. The high-water mark is stored, so it survives restarts.
4. Profit-target lock. Once the balance reaches the target, trading stops — so a passed challenge stays passed.
5. Position caps. Max open positions, max lots per position (excess is trimmed), max total lots.
6. Oversized-trade trim. A new position that risks more than your per-trade limit at its stop-loss has the excess volume closed.
7. Forced stop-loss. Any position opened without a stop gets one at your distance, respecting the broker's minimum stop level.
8. Trading window. Outside the hours you allow (server time, may cross midnight) everything is closed and new positions are blocked. Optional Friday close hour and weekend flat.
9. Spread guard. The panel shows WAIT when the spread is above your maximum.

RISK-BASED LOT SIZE ON THE PANEL
Set risk as a percent of balance or a fixed amount and the stop distance you trade with; the panel shows the exact lot size for the chart symbol using the symbol's tick value, tick size and volume step — correct on gold, indices and crypto CFDs, not only forex.

LOCKS ARE RESTART-PROOF
Lock state, day and week bases, initial balance and the equity high-water mark are stored in terminal global variables. Restart the terminal, re-attach the EA, change the chart — the lock is still there until its period rolls.

SCOPE
Guard the whole account from one chart, or only the chart symbol, or only one magic number.

ALERTS
Terminal alert, push notification to the mobile terminal, e-mail — each optional. Every action is also written to the Experts log.

PANEL BUTTONS
PAUSE / RESUME stops all enforcement without removing the EA (for a deliberate exception). CLOSE ALL flattens every guarded position.

STRATEGY TESTER
In the tester only, the EA opens a small test position about once an hour (risk-sized, with a legal stop and target, margin-checked) so you can watch every rule fire on your own settings before going live. This never happens outside the tester.

INPUTS

Risk per trade
- Risk mode: percent of balance / fixed amount
- Risk % of balance (1.0) · Fixed risk in account currency (100)
- Stop distance in pips for the lot calculation (20)
- Trim positions that risk more than the limit (true)
- Add SL to positions opened without one (true) · Forced SL distance in pips (30)

Daily and weekly limits
- Enable daily loss limit (true) · Daily loss % of start-of-day base (4.0) · Daily loss in money, overrides % when > 0 (0)
- Start-of-day base: balance / equity
- Enable weekly loss limit (false) · Weekly loss % of start-of-week balance (8.0)

Max drawdown and profit target
- Max drawdown mode: off / static from initial balance / trailing from equity high-water mark (trailing)
- Max drawdown % (8.0) · Initial balance, 0 = balance when first attached (0)
- Enable profit-target lock (false) · Profit target % of initial balance (10.0)

Position caps
- Max open positions, 0 = off (3) · Max lots per position, 0 = off (0) · Max total lots, 0 = off (0)
- Spread warning above, pips, 0 = off (3.0)

Trading window, server time
- Enable trading window (false) · Start hour (0) · End hour, 24 = midnight (24)
- Close all and lock before the weekend (false) · Friday close hour (21)

Behaviour
- Close all positions when a lock engages (true) · Only guard this chart's symbol (false) · Magic number to guard, 0 = all (0)

Alerts
- Terminal alert (true) · Push notification (false) · E-mail (false)

Display
- Show panel (true) · Panel corner · Font size (10)

A pip is 10 points on 3- and 5-digit quotes and 1 point otherwise. Works on hedging and netting accounts. No DLLs, no external files, no custom indicators.

RECOMMENDED SETTINGS FOR A TYPICAL CHALLENGE
Daily 4% of balance · trailing drawdown 8% · profit target 10% · max 3 positions · forced SL 30 pips · trim oversized on · Friday flat on at 21:00 server.

FREE VERSION
The basic rule set (risk-based lot size, daily lock, max positions, trim, forced SL) is free in the CodeBase as "Risk Guard". Risk Guard Prop adds the weekly limit, static and trailing max drawdown, the profit-target lock, lot caps, the trading window and weekend flat, push and e-mail alerts, panel buttons, magic-number scope and the tester demo mode.

Yazarın diğer ürünleri
Smart Loss Exit Prop is not a trading strategy. On a live or demo account it never opens a position and it never touches a position that is in profit. Attach it to one chart and it watches every position on the account — your manual trades and any other Expert Advisor — and cuts the losers that meet your rules, before they reach the hard stop that ends a challenge. It is built for prop-firm challenges and funded accounts, where the daily loss limit is closer than the stop-loss, and for anyone
Filtrele:
Değerlendirme yok
Değerlendirmeye yanıt