Maestrale EA
- Experts
- Version: 1.0
- Activations: 5
𝗠𝗔𝗘𝗦𝗧𝗥𝗔𝗟𝗘 𝗘𝗔 — 𝗫𝗔𝗨𝗨𝗦𝗗 𝗠𝗘𝗔𝗡 𝗥𝗘𝗩𝗘𝗥𝗦𝗜𝗢𝗡
𝗦𝘆𝗺𝗯𝗼𝗹: 𝗫𝗔𝗨𝗨𝗦𝗗 (𝗚𝗼𝗹𝗱) | 𝗧𝗶𝗺𝗲𝗳𝗿𝗮𝗺𝗲: 𝗠𝟱 | 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺: 𝗠𝗲𝘁𝗮𝗧𝗿𝗮𝗱𝗲𝗿 𝟱
Maestrale EA is a fully automated mean-reversion system for XAUUSD M5. It buys oversold dips in an uptrend and sells overbought spikes in a downtrend, with a fixed ATR-based stop loss, an ATR-based take profit and a time-based exit on every position. One position at a time, no grid, no hidden averaging.
-------------------------------------------------------------
𝗛𝗢𝗪 𝗜𝗧 𝗪𝗢𝗥𝗞𝗦
1. Trend filter: EMA(200). Longs only above it, shorts only below it.
2. Signal: RSI(14) below 30 (long) or above 75 (short) on the closed bar. An optional "stretch" confirmation requires price to be at least 2.5 ATR away from the EMA(20).
3. Every position has three exits: a take profit at 3 ATR, a catastrophic stop loss at 9 ATR, and a forced time exit after 200 bars. Optional break-even and trailing stop are available.
4. Entries are paused around the daily rollover and during the configured hours; all positions are closed on Friday evening before the weekend (configurable).
5. Recovery (optional): after N consecutive losses the trade risk is multiplied; each further loss re-multiplies it, any full recovery resets it. A hard cap on the number of recovery trades and on the lot size is always enforced.
-------------------------------------------------------------
𝗥𝗜𝗦𝗞 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦
Three ready-to-use profiles:
- 𝗗𝗘𝗙𝗔𝗨𝗟𝗧 (𝗯𝘂𝗶𝗹𝘁-𝗶𝗻): aggressive recovery (x7, up to 7 recovery trades), trading window 01-18, risk 1% per trade. Highest potential return, highest risk: the recovery chain can reach very large positions. For experienced users who understand martingale risk.
- 𝗕𝗔𝗟𝗔𝗡𝗖𝗘𝗗 (𝘀𝗲𝘁 𝗳𝗶𝗹𝗲): moderate x3 recovery limited to 3 recovery trades, risk 1.5%. Backtest 2020-2026 with commissions: about 8.9% per year with max drawdown around 6.8% - the best return/risk ratio of the tested grid.
- 𝗖𝗢𝗡𝗦𝗘𝗥𝗩𝗔𝗧𝗜𝗩𝗘 (𝘀𝗲𝘁 𝗳𝗶𝗹𝗲): no recovery at all, risk 1.0%. Backtest 2020-2026 with commissions: about 5.4% per year with max drawdown around 4.6%.
All profiles share the same signal engine, the same protections and the same Friday close.
The set files for the Balanced and Conservative profiles are published in the Comments section.
-------------------------------------------------------------
𝗧𝗛𝗘 𝗜𝗡𝗣𝗨𝗧𝗦
𝗦𝗶𝗴𝗻𝗮𝗹
- InpRsiBuy: RSI oversold threshold for longs
- InpRsiSell: RSI overbought threshold for shorts
- InpRsiPeriod: RSI period
- InpEmaPeriod: trend EMA period
- InpAtrPeriod: ATR period
𝗦𝘁𝗿𝗲𝘁𝗰𝗵 𝗰𝗼𝗻𝗳𝗶𝗿𝗺𝗮𝘁𝗶𝗼𝗻
- InpUseStretch: enable the price-stretch confirmation
- InpStretchEma: fast reference EMA period
- InpStretchTh: minimum distance from the fast EMA, in ATR
𝗘𝘅𝗶𝘁
- InpSlAtrMult: stop loss in ATR multiples
- InpTpAtrMult: take profit in ATR multiples
- InpMaxBars: forced close after N bars
𝗕𝗿𝗲𝗮𝗸-𝗲𝘃𝗲𝗻
- InpUseBreakEven: enable the break-even
- InpBeTrigger: profit in ATR that triggers the break-even
- InpBeOffset: ATR locked beyond the entry price
𝗧𝗿𝗮𝗶𝗹𝗶𝗻𝗴 𝘀𝘁𝗼𝗽
- InpUseTrailing: enable the trailing stop
- InpTsActivation: profit in ATR that starts the trailing
- InpTsDistance: trailing distance from the best price, in ATR
𝗟𝗼𝘁 𝘀𝗶𝘇𝗶𝗻𝗴
- InpLotMode: fixed lot, fixed USD risk or percent of balance
- InpFixedLots: lot size in fixed mode
- InpRiskUSD: risk per trade in USD
- InpRiskPercent: risk per trade as percent of balance
- InpAllowMinLot: use the minimum lot when the computed size is below it
- InpMaxLots: hard cap on position size
The broker commission is auto-detected from the account's deal history.
𝗥𝗲𝗰𝗼𝘃𝗲𝗿𝘆 𝘀𝗲𝘁𝘁𝗶𝗻𝗴𝘀
- InpMMMode: recovery off, martingale or anti-martingale
- InpTriggerN: consecutive losses (or wins) that start the recovery
- InpMultiplier: risk multiplier, re-applied on each further loss
- InpHoldTrades: winning trades that keep the raised risk before the reset
- InpMaxRecovery: maximum recovery trades before a forced reset
𝗧𝗿𝗮𝗱𝗶𝗻𝗴 𝘁𝗶𝗺𝗲
- InpUseTimeFilter: enable the entry time window
- InpStartHour: entry window start hour (server time)
- InpEndHour: entry window end hour (server time)
- InpCloseFriday: close all positions on Friday evening
- InpFridayHour: Friday close hour (server time)
𝗣𝗮𝗻𝗲𝗹
- ShowPanel: show the on-chart info panel
- PanelX / PanelY: panel position
- PanelTextColor / PanelBGColor: panel text and background colors
𝗧𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹
- InpMagic: identifier of the EA's trades
- InpSlippagePoints: maximum accepted slippage in points
- InpMaxSpreadPoints: maximum spread to enter (0 = off)
- InpTradeComment: comment shown on orders
-------------------------------------------------------------
𝗥𝗘𝗖𝗢𝗠𝗠𝗘𝗡𝗗𝗔𝗧𝗜𝗢𝗡𝗦
- Symbol: XAUUSD (gold)
- Timeframe: M5
- Account: ECN / Raw spread with low commissions
- Recommended deposit: 1000 USD or more
- Leave the EA running 24/5 on a VPS
-------------------------------------------------------------
𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧 𝗡𝗢𝗧𝗜𝗖𝗘
The default profile uses an optional martingale-type recovery system that increases the trade risk after consecutive losses. It is fully configurable and can be disabled (the Conservative set uses no recovery at all). Read the "Risk profiles" section before going live.
Backtests with realistic costs are shown in the screenshots with their exact test conditions. The recovery system amplifies both profits and losses: test the profile you intend to use on a demo account first. Past performance does not guarantee future results.
𝗦𝘆𝗺𝗯𝗼𝗹: 𝗫𝗔𝗨𝗨𝗦𝗗 (𝗚𝗼𝗹𝗱) | 𝗧𝗶𝗺𝗲𝗳𝗿𝗮𝗺𝗲: 𝗠𝟱 | 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺: 𝗠𝗲𝘁𝗮𝗧𝗿𝗮𝗱𝗲𝗿 𝟱
Maestrale EA is a fully automated mean-reversion system for XAUUSD M5. It buys oversold dips in an uptrend and sells overbought spikes in a downtrend, with a fixed ATR-based stop loss, an ATR-based take profit and a time-based exit on every position. One position at a time, no grid, no hidden averaging.
-------------------------------------------------------------
𝗛𝗢𝗪 𝗜𝗧 𝗪𝗢𝗥𝗞𝗦
1. Trend filter: EMA(200). Longs only above it, shorts only below it.
2. Signal: RSI(14) below 30 (long) or above 75 (short) on the closed bar. An optional "stretch" confirmation requires price to be at least 2.5 ATR away from the EMA(20).
3. Every position has three exits: a take profit at 3 ATR, a catastrophic stop loss at 9 ATR, and a forced time exit after 200 bars. Optional break-even and trailing stop are available.
4. Entries are paused around the daily rollover and during the configured hours; all positions are closed on Friday evening before the weekend (configurable).
5. Recovery (optional): after N consecutive losses the trade risk is multiplied; each further loss re-multiplies it, any full recovery resets it. A hard cap on the number of recovery trades and on the lot size is always enforced.
-------------------------------------------------------------
𝗥𝗜𝗦𝗞 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦
Three ready-to-use profiles:
- 𝗗𝗘𝗙𝗔𝗨𝗟𝗧 (𝗯𝘂𝗶𝗹𝘁-𝗶𝗻): aggressive recovery (x7, up to 7 recovery trades), trading window 01-18, risk 1% per trade. Highest potential return, highest risk: the recovery chain can reach very large positions. For experienced users who understand martingale risk.
- 𝗕𝗔𝗟𝗔𝗡𝗖𝗘𝗗 (𝘀𝗲𝘁 𝗳𝗶𝗹𝗲): moderate x3 recovery limited to 3 recovery trades, risk 1.5%. Backtest 2020-2026 with commissions: about 8.9% per year with max drawdown around 6.8% - the best return/risk ratio of the tested grid.
- 𝗖𝗢𝗡𝗦𝗘𝗥𝗩𝗔𝗧𝗜𝗩𝗘 (𝘀𝗲𝘁 𝗳𝗶𝗹𝗲): no recovery at all, risk 1.0%. Backtest 2020-2026 with commissions: about 5.4% per year with max drawdown around 4.6%.
All profiles share the same signal engine, the same protections and the same Friday close.
The set files for the Balanced and Conservative profiles are published in the Comments section.
-------------------------------------------------------------
𝗧𝗛𝗘 𝗜𝗡𝗣𝗨𝗧𝗦
𝗦𝗶𝗴𝗻𝗮𝗹
- InpRsiBuy: RSI oversold threshold for longs
- InpRsiSell: RSI overbought threshold for shorts
- InpRsiPeriod: RSI period
- InpEmaPeriod: trend EMA period
- InpAtrPeriod: ATR period
𝗦𝘁𝗿𝗲𝘁𝗰𝗵 𝗰𝗼𝗻𝗳𝗶𝗿𝗺𝗮𝘁𝗶𝗼𝗻
- InpUseStretch: enable the price-stretch confirmation
- InpStretchEma: fast reference EMA period
- InpStretchTh: minimum distance from the fast EMA, in ATR
𝗘𝘅𝗶𝘁
- InpSlAtrMult: stop loss in ATR multiples
- InpTpAtrMult: take profit in ATR multiples
- InpMaxBars: forced close after N bars
𝗕𝗿𝗲𝗮𝗸-𝗲𝘃𝗲𝗻
- InpUseBreakEven: enable the break-even
- InpBeTrigger: profit in ATR that triggers the break-even
- InpBeOffset: ATR locked beyond the entry price
𝗧𝗿𝗮𝗶𝗹𝗶𝗻𝗴 𝘀𝘁𝗼𝗽
- InpUseTrailing: enable the trailing stop
- InpTsActivation: profit in ATR that starts the trailing
- InpTsDistance: trailing distance from the best price, in ATR
𝗟𝗼𝘁 𝘀𝗶𝘇𝗶𝗻𝗴
- InpLotMode: fixed lot, fixed USD risk or percent of balance
- InpFixedLots: lot size in fixed mode
- InpRiskUSD: risk per trade in USD
- InpRiskPercent: risk per trade as percent of balance
- InpAllowMinLot: use the minimum lot when the computed size is below it
- InpMaxLots: hard cap on position size
The broker commission is auto-detected from the account's deal history.
𝗥𝗲𝗰𝗼𝘃𝗲𝗿𝘆 𝘀𝗲𝘁𝘁𝗶𝗻𝗴𝘀
- InpMMMode: recovery off, martingale or anti-martingale
- InpTriggerN: consecutive losses (or wins) that start the recovery
- InpMultiplier: risk multiplier, re-applied on each further loss
- InpHoldTrades: winning trades that keep the raised risk before the reset
- InpMaxRecovery: maximum recovery trades before a forced reset
𝗧𝗿𝗮𝗱𝗶𝗻𝗴 𝘁𝗶𝗺𝗲
- InpUseTimeFilter: enable the entry time window
- InpStartHour: entry window start hour (server time)
- InpEndHour: entry window end hour (server time)
- InpCloseFriday: close all positions on Friday evening
- InpFridayHour: Friday close hour (server time)
𝗣𝗮𝗻𝗲𝗹
- ShowPanel: show the on-chart info panel
- PanelX / PanelY: panel position
- PanelTextColor / PanelBGColor: panel text and background colors
𝗧𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹
- InpMagic: identifier of the EA's trades
- InpSlippagePoints: maximum accepted slippage in points
- InpMaxSpreadPoints: maximum spread to enter (0 = off)
- InpTradeComment: comment shown on orders
-------------------------------------------------------------
𝗥𝗘𝗖𝗢𝗠𝗠𝗘𝗡𝗗𝗔𝗧𝗜𝗢𝗡𝗦
- Symbol: XAUUSD (gold)
- Timeframe: M5
- Account: ECN / Raw spread with low commissions
- Recommended deposit: 1000 USD or more
- Leave the EA running 24/5 on a VPS
-------------------------------------------------------------
𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧 𝗡𝗢𝗧𝗜𝗖𝗘
The default profile uses an optional martingale-type recovery system that increases the trade risk after consecutive losses. It is fully configurable and can be disabled (the Conservative set uses no recovery at all). Read the "Risk profiles" section before going live.
Backtests with realistic costs are shown in the screenshots with their exact test conditions. The recovery system amplifies both profits and losses: test the profile you intend to use on a demo account first. Past performance does not guarantee future results.
