Gaussian Bands Trading EA
- Experts
- Versão: 3.10
Gaussian Bands Trading EA
Gaussian Bands Trading EA is a MetaTrader 5 Expert Advisor that trades Gaussian-weighted price bands and manages separate BUY and SELL baskets. The indicator is embedded; no separate indicator installation is required. Version 3.10.
Signal modes
Current band crossing: BUY when the previous candle closed below its lower band and the current price is above the current lower band; SELL when the previous candle closed above its upper band and the current price is below the current upper band.
Closed candle: BUY after a completed candle closes below the lower band; SELL after a completed candle closes above the upper band. Each newly closed candle is evaluated once. The previous candle is not replayed at startup.
The EA uses the current chart's symbol and timeframe and checks signals and management every five seconds. Indicator turn arrows are visual information, not the entry trigger.
Bands and basket management
Choose Gaussian-weighted standard-deviation bands or fixed-distance bands. Fixed band distance is identical on both sides and is measured in broker points. At least 500 bars are needed for the indicator calculation.
Additional same-direction trades require another signal, sufficient adverse movement from the latest same-direction entry, and the configured spacing checks. Requested volume increases additively by lotStep. Ordinary entries also check spread, available margin and position limits; requested volumes are adjusted to the symbol's volume limits and step.
BUY and SELL baskets have separate profit targets. With swap adjustment enabled, the target comparison includes floating price profit plus swap, but not commissions. Otherwise exits use the volume-weighted average entry price plus or minus the configured target distance.
Optional hedge management is disabled by default. Its trigger uses ordinary positions' combined floating price profit, excluding swap. The threshold is in account currency. Hedge volume equals total ordinary position volume multiplied by hedgeLotRatio. The hedge has an initial stop loss and can move that stop to its entry price. The simplified hedge direction rule is not a precise net-exposure hedge when both BUY and SELL baskets exist.
Inputs
nweBandwidth: Gaussian weighting bandwidth (default 8.0).
nweSource: applied price (default Close).
nweBandMode: standard deviation or fixed points.
nweFixedBandPoints: distance from the center to each fixed band (default 100 points).
nweBandMultiplier: standard-deviation multiplier (default 2.0); unused in fixed mode.
nweUpColor / nweDownColor / nweBandColor: indicator colors.
signalMode: current crossing or closed-candle signals.
magicNumber: identifies this EA's positions on the current symbol (default 12345).
initialLotSize: initial requested volume (default 0.01).
lotStep: additive volume increment for additional trades (default 0.01).
recoveryDistance: base adverse-movement distance (default 3.6 pips).
distanceMultiplier: increases recovery spacing as the basket lot size grows (default 61).
minPriceDistance: minimum spacing between same-direction entries (default 7.4 pips).
takeProfitDistance: directional basket target distance (default 4.3 pips).
maxSpread: maximum spread for ordinary entries (default 3.0 pips).
maxBuyPositions / maxSellPositions: ordinary position limits per direction (default 50 each).
useSwapAdjustment: include swap in basket targets (default true).
useHedge: enable optional hedge management (default false).
hedgeActivationLoss: ordinary-position floating-loss threshold in account currency (default -5000).
hedgeLotRatio: hedge volume ratio (default 1.0).
hedgeStopLossDistance: initial hedge stop distance (default 50 pips).
hedgeBreakevenPips: hedge profit needed to move its stop to entry (default 20 pips).
Distance units
Trading distances use pips: ten points on three- and five-digit symbols, one point otherwise. Verify the meaning of these distances for your instrument. Fixed band width always uses broker points.
Operating requirements and risk
Use a hedging account. Test settings in Strategy Tester and on a demo account before live use. Recovery trading increases exposure and can produce substantial drawdown. Ordinary positions have no broker-side stop loss or take profit; keep the EA running for basket management. No profit or loss-recovery outcome is guaranteed.
The embedded indicator's chart label remains Nadaraya-Watson. Trade comments may display the legacy text RSI Bands Bot Buy or RSI Bands Bot Sell; the trading signals described here use Gaussian price bands, not RSI.
