gold-orb-ea — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited gold-orb-ea (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
USE FOR:
tags: [MQL5, MT5, EA, gold, XAUUSD, ORB, opening-range-breakout, price-action, 1H, hedging] kind: tool category: mt5-integration
MQL5 Expert Advisor for XAUUSD 1H Opening Range Breakout.
Market open: 1:02 AM server time
First 1H candle → defines initial support (low) and resistance (high)Wait for N consecutive candles to close WITHIN the range
Default N = 3 (user-adjustable)
Range becomes "final" only after consolidation confirmedSignal 11 → Price BREAKS ABOVE resistance → BUY
Signal 10 → Price BREAKS BELOW support → SELL
Signal 0 → No breakout → No trade| Parameter | Default |
|---|---|
| Take Profit | 1,200 points |
| Stop Loss | 400 points |
| R:R Ratio | 3:1 |
| Max trades/day | 2 (1 long + 1 short independently) |
| Risk per trade | 1% of account balance |
| Max equity drawdown | 10% |
// Candle detection
class new_candle_check2 {
bool IsNewCandle(); // Returns true on new H1 candle open
}
// Core strategy
class Open_Range_Breakout {
int GetSignal(); // Returns: 11=BUY, 10=SELL, 0=NONE
// Internally tracks: range high, range low, candle count
}
// Execution (built-in MQL5 classes)
CTrade trade; // Order send / modify / close
CTrailing trailing; // Dynamic stop-loss trailing// OnInit — setup
int OnInit() {
// Validate symbol, timeframe
// Initialize ORB object
// Set risk parameters
return INIT_SUCCEEDED;
}
// OnTick — main logic
void OnTick() {
if (!new_candle.IsNewCandle()) return; // Only act on new H1 candle
int signal = orb.GetSignal();
if (signal == 11 && long_enabled && daily_buys < 1) {
double lot = CalcLotSize(risk_pct, sl_points);
trade.Buy(lot, _Symbol, 0, sl_price, tp_price, "GOLD_ORB_BUY");
daily_buys++;
}
if (signal == 10 && short_enabled && daily_sells < 1) {
double lot = CalcLotSize(risk_pct, sl_points);
trade.Sell(lot, _Symbol, 0, sl_price, tp_price, "GOLD_ORB_SELL");
daily_sells++;
}
// Check drawdown limit
if (GetEquityDrawdown() > max_drawdown_pct) CloseAllPositions();
}double CalcLotSize(double risk_pct, int sl_points) {
double account_balance = AccountInfoDouble(ACCOUNT_BALANCE);
double risk_amount = account_balance * risk_pct / 100.0;
double tick_value = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
double lot = risk_amount / (sl_points * tick_value);
return NormalizeDouble(lot, 2);
}| Feature | Detail |
|---|---|
| Dynamic sizing | % of account balance per trade |
| Max drawdown | Hard stop at 10% equity loss |
| Daily trade limit | 1 long + 1 short max |
| Losing streak detection | Reduces size after N consecutive losses |
| Virtual simulation | Test without real orders |
| Independent long/short | Can disable either direction |
1. Clone repo → copy folder to:
C:\Users\[user]\AppData\Roaming\MetaQuotes\Terminal\[ID]\MQL5\Experts\GOLD_ORB\
2. Open MetaEditor → recompile .mq5 files
3. Open XAUUSD H1 chart in MT5
4. Drag EA from Navigator → attach to chart
5. Configure inputs:
- Enable/disable long/short
- Adjust risk_pct, max_drawdown_pct
- Set candle consolidation threshold (default 3)
- Enable trailing stop if desiredGold ORB works well because:
- London open (2-3 AM NY time) creates sharp directional moves
- Asia session establishes clear range (low volatility consolidation)
- Breakout of Asia range at London/NY open = high-probability continuation
Optimal configuration for gold:
- Range period: Asian session (22:00–02:00 server)
- Breakout time: London open (02:00–04:00 server)
- Filter: Only trade if range width > 5 ATR (avoid false breakouts)
- Exit: Trail stop after 1R achievedThe framework is designed to be adapted:
// Change symbol
input string TradingSymbol = "EURUSD"; // or "GBPJPY", "US30", etc.
// Adjust open time per symbol's market open
input string MarketOpenTime = "08:00"; // London for forex
// Adjust TP/SL to match symbol volatility (in points)
input int TakeProfit = 300; // Tighter for forex vs gold
input int StopLoss = 150;~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.