Grid oil never die
- Experts
- 버전: 2.11
- 활성화: 5
GridOil Buy-Only is a percentage-based buy grid Expert Advisor for crude oil (WTI / Brent) on MetaTrader 5. It builds a ladder of buy levels below the market. Each level has its own take profit one grid step higher. Stuck orders are reduced only with profit the EA has actually realized.
Oil has historically traded within wide ranges. The EA buys the dips level by level and takes profit on every bounce. Grid orders have no per-order stop loss, and portfolio protection is optional.
How it works
- Ladder – In Auto Zone mode, levels are placed below an anchor price at a fixed % step (default: first level 0.5% below, then every 2%). Manual Zone mode lets you define up to 3 fixed price zones, each with its own step and lot.
- Entry – A market order is sent when price comes back down to an empty level. Buy Limit orders on the server are optional.
- Exit – Each order has a take profit one step above its entry. When it closes, the level is free again and can trade again.
- Ladder follows price – When the basket is empty and price moves well above the anchor, or falls below the last level, the anchor moves to the current price.
- Profit-Funded De-risk – Each time equity rises by a set %, the deepest losing orders are closed. They are paid for only with profit this EA has already realized, never with deposits or other EAs' profit.
Main features
- Auto Zone (ladder that follows price) or up to 3 Manual Zones
- Percentage grid step, so levels keep the same shape at any price
- Optional lot increase for deeper levels
- Take profit on every order (+1 grid step)
- Profit-Funded De-risk: closes deep orders with realized profit only
- Built-in capital calculator: shows the estimated floating loss at the floor, the margin needed and the recommended balance. It can block new orders when the balance is too low.
- Optional Equity Stop (% drawdown or fixed equity level), which closes everything and halts
- Deposits and withdrawals are not treated as profit or drawdown
- Max open orders cap and floor price
- Optional Trend Rider: EMA trend orders with a server-side trailing stop and pyramiding
- Market-on-touch or Buy Limit entry mode, spread filter (% of price)
- State is bound to account + symbol + magic and survives terminal restarts
- Checks volume, free margin and broker limits before every order
Requirements
- Hedging account only
- Symbol: WTI or Brent crude oil (for example XTIUSD, USOIL, WTI, UKOIL). Other symbols can be traded with suitable settings.
- Chart timeframe: any (the grid is price-based)
- Balance: check the recommended balance on the chart panel for your settings. The default ladder uses 0.01 lot per level.
- Run 24/5 on a VPS (market-on-touch mode needs the terminal online)
Input parameters
Grid Mode
- Use Auto Zone – true = ladder from an anchor price, false = Manual Zones
Auto Zone
- Anchor price – 0 = market price at first start (remembered)
- First level below anchor (%) – avoids buying the top
- Grid step (%) – distance between levels and take profit size
- Number of levels – length of the ladder
- Lot of top level
- Increase lot every N levels / lot added – bigger lots deeper (0 = same lot)
- Reset anchor – one-shot switch to set a new anchor from the current price
- Move anchor % – move the ladder up with price while the basket is empty (0 = off)
Manual Zones 1–3
- Top / bottom price, step %, lot per level for each zone (0 = zone not used)
Portfolio Risk
- Floor price – no new orders below it (0 = automatic)
- Equity Stop % / money – close everything and halt (0 = off)
- Max open grid orders – open + pending cap (0 = no limit)
- Block if underfunded – no new orders when the balance is below the calculated need
- Fill missed levels at market – buy levels price has already passed
- Max margin usage % – the most free margin one order may use
Profit-Funded De-risk
- Clear step % – equity rise that triggers a clear (0 = off)
- Clear mode – 1 = deepest orders first, 2 = whole basket (only if realized profit covers it)
- Min depth %, max orders per clear, budget factor
- Include trend orders
Order Entry
- Use pending orders – Buy Limit on server, or market order on touch
- Max slippage (points)
- Max spread (% of price) – 0 = off
Trend Rider (lot 0 = off)
- Lot, timeframe, EMA period – entry when a bar closes above a rising EMA
- Max trend orders, pyramid step %
- Trailing stop %
- No-cut mode – no initial stop loss; the trailing stop only locks profit
- Trend flip min profit %
System
- Magic number, symbol check, Reset Halt (one-shot switch after an Equity Stop), Show panel
Before you start
- Backtest with your broker's oil symbol and check the recommended balance in the Experts log.
- Oil buy positions usually pay negative swap, so long holding costs money.
- Start with a small lot on a demo account.
Risk warning
This EA opens grid orders without a stop loss. If oil falls far below the ladder, floating losses can become very large and the account can be lost, unless you enable the Equity Stop or keep enough capital for the whole ladder. Past performance does not guarantee future results. Trade only with money you can afford to lose.
