Jarvis v11
- Experts
-
Janei Araujo De Moura Junior
Trading robot (Expert Advisor) and indicator developer in MQL4/MQL5, with 10+ years of experience in software development and cloud infrastructure. - Versione: 11.0
- Attivazioni: 5
Jarvis ORB – Range Breakout with Grid, Dynamic Hedge and Basket Protection
Jarvis ORB is an Expert Advisor for MetaTrader 5 that trades the Opening Range Breakout and manages every trade as a basket: optional grid, a dynamic hedge with fast exit, and risk limits on several levels. It was developed and tested mainly on XAUUSD (gold).
HOW IT WORKS
1. Daily range: at the start of the trading day (configurable time), the EA marks the high and low of the first N M15 candles (default: 4 candles = 1 hour).
2. Entry: once the range is ready, the EA watches M1 candle closes.
• Zone + Color mode (default): a green candle closing above the high opens a buy; a red candle closing below the low opens a sell. No new cycle is opened inside the channel.
• Crossover mode: one entry when a candle crosses the range boundary.
3. Short cycles: the basket closes when it reaches the target (or is protected and followed by trailing), and the EA waits for the next signal. Several cycles per day, up to the daily goal.
4. If price moves against the position: the grid adds orders at fixed distances and, once the floating loss passes the trigger, the dynamic hedge opens in the opposite direction.
POSITION MANAGEMENT
Grid / martingale, three modes:
• GRID: keeps the orders and adds positions with a multiplied lot.
• RESET: closes and reopens with a larger lot.
• RECOVERY: closes, accumulates the loss and calculates the lot needed to recover it plus a net target.
Multiplier, maximum number of orders and distance are configurable for each side.
Dynamic hedge (requires a HEDGING account):
• The hedge lot is calculated on the spot from the exposed volume and the floating result, so the basket returns to the target if price moves X more points against the cycle.
• Fixed lot (with multiplier) or a lot proportional to the cycle volume are also available.
• Fast exit: after reaching a configurable profit, the hedge is protected and closes at break-even or in profit if price comes back. It has its own stop, measured by price movement (excluding the opening spread).
• Re-entry: if price moves in the hedge's favor again, the hedge is reopened with a recalculated lot, with an optional limit of re-entries per cycle.
• What the hedge has already realized in the cycle counts toward the basket target.
• Configurable maximum hedge lot.
• The grid can be paused while the hedge is open, or for the rest of the cycle after the first hedge.
• The hedge uses its own magic number.
Basket protection:
• Decisions are based on the result of the whole basket, not on individual orders.
• Profit protection: after a minimum profit, a floor is locked in and the basket is trailed in dollars and in points (real stop on the orders).
• Individual break-even and trailing stop.
• Optional lock that prevents individual orders from closing while the basket is negative.
RISK CONTROL
• Real emergency stop loss (SL on the broker side) on every order, in case the terminal or VPS goes down.
• Margin validation with OrderCheck before every order, with configurable minimum free margin.
• Daily goal and maximum daily loss, with the option to close everything.
• Action at maximum floating loss: stop new orders, close everything, or switch to safe mode.
• Spread filter and trading hours.
• Close at end of day and before the weekend.
• NETTING account detection: blocks hedge and grid, which would not work on that account type.
• State is saved across terminal restarts (martingale levels, basket protection, hedge).
PANEL AND CHART
• Panel with range, account, orders, protection, risk/grid/hedge and projection.
• Buttons: Pause, Resume, Close all, Close buys, Close sells, Safe mode, Reset cycle.
• Projection lines on the chart: next orders with lot and projected floating, target, trailing, basket stop and hedge lines (protect, exit, stop, reopen).
• Daily profit/loss report in the Journal and, optionally, on Discord (webhook).
RECOMMENDATIONS
• Symbol: XAUUSD. Other symbols require adjusting the point-based parameters.
• Chart: any timeframe (the EA reads M15 and M1 internally).
• Account: HEDGING, low spread and fast execution. A VPS is recommended.
• Capital: with a 0.01 starting lot and grid and hedge enabled, we recommend at least USD 3,000. The grid and hedge can cause drawdowns of several hundred dollars in a single day.
• Trading hours: set the end-of-day close a few minutes before the symbol's daily break at your broker, so positions do not stay open through the break.
• Before trading live: test in the Strategy Tester with "Every tick based on real ticks" and on a demo account, using your broker's server time. Adjust HoraInicioRange / OffsetHorasServidor to the symbol's session.
• Discord: to receive the report, add https://discord.com under Tools > Options > Expert Advisors > "Allow WebRequest for listed URL".
MAIN PARAMETERS
• Range: range and entry timeframes, number of candles, start time, server offset.
• Entry: mode, initial lot, allow buy / sell.
• Martingale / Grid: mode, multipliers, maximum orders, distances.
• Hedge: trigger by floating loss or by number of orders, lot mode (fixed, proportional, dynamic), dynamic distance and target, maximum lot.
• Hedge fast exit: protection profit, exit level, pullback from peak, stop in dollars, re-entry distance, maximum re-entries, grid pause after the hedge.
• Daily goal / daily stop / basket, global protection, break-even / trailing, trading hours, safety, panel, projection, Discord.
Note: parameter names and the panel are in Portuguese.
RISK WARNING
This EA uses grid/martingale and hedging. These techniques increase exposure when the market moves against the position and can lead to significant losses, including the loss of all capital. Past results, in backtests or on live accounts, do not guarantee future results. Trade only with money you can afford to lose and start on a demo account.
