Bollinger Bands Dual Strategy Auto Trader
- エキスパート
- バージョン: 1.1
- アクティベーション: 10
Product Overview
Bollinger Bands Dual Strategy Auto Trader is an automated trading Expert Advisor for MetaTrader 4.
The EA uses Bollinger Bands as its core indicator and provides two selectable trading modes:
-
Mean Reversion
-
Breakout Trading
Entry signals are evaluated using the previous completed candle. This helps avoid unstable signals caused by an unfinished candle.
Users can adjust the Bollinger Bands settings, trading mode, lot size, Stop Loss, Take Profit, spread limit and position controls according to their preferred symbol, timeframe and risk tolerance.
Main Features
-
Two selectable trading modes
-
Mean Reversion and Breakout logic
-
Entry signals based on a completed candle
-
Optional new-bar-only entry evaluation
-
Optional one-position limit per symbol and Magic Number
-
Fixed lot size with broker lot-step normalization
-
Configurable Stop Loss and Take Profit
-
Optional middle-band exit
-
Configurable maximum spread
-
Free-margin check before sending an order
-
Broker Stop Level and Freeze Level validation
-
Protection against repeated order attempts from the same signal bar
-
Protection against immediate same-tick re-entry after a middle-band exit
-
Throttled trade-error logging
-
No DLL, external files, WebRequest or external licensing service required
Trading Logic
The EA compares the closing price of the previous completed candle with the Bollinger Bands upper and lower bands.
Mean Reversion Mode
This mode is designed for situations where price moves outside the Bollinger Bands and may return toward the average price.
-
Previous candle closes above the upper band: open a Sell position
-
Previous candle closes below the lower band: open a Buy position
When the middle-band exit is enabled:
-
Buy positions close when price returns to or above the middle band
-
Sell positions close when price returns to or below the middle band
Breakout Mode
This mode trades in the direction of a confirmed Bollinger Bands breakout.
-
Previous candle closes above the upper band: open a Buy position
-
Previous candle closes below the lower band: open a Sell position
When the middle-band exit is enabled:
-
Breakout Buy positions close when price falls back to the middle band
-
Breakout Sell positions close when price rises back to the middle band
Execution and Risk Controls
Before opening a new position, the EA checks:
-
Terminal connection status
-
Automated trading permission
-
Symbol trading permission
-
Valid Bid and Ask prices
-
Trade-context availability
-
Current spread
-
Broker minimum, maximum and step lot requirements
-
Stop Loss and Take Profit validity
-
Broker Stop Level and Freeze Level
-
Available account margin
When a trading condition is invalid, the EA skips the new order instead of repeatedly sending the same rejected request.
Input Parameters
-
InpBandsPeriod
Bollinger Bands calculation period. Default: 20. -
InpBandsShift
Horizontal shift of the Bollinger Bands. Default: 0. -
InpBandsDeviations
Bollinger Bands deviation multiplier. Default: 2.0. -
InpAppliedPrice
Price type used for the Bollinger Bands calculation. Default: Close price. -
InpMode
Selects Mean Reversion or Breakout trading mode. -
InpUseNewBarOnly
Evaluates new entry signals only when a new candle begins. Default: true. -
InpOnePositionOnly
Allows only one open position for the current symbol and Magic Number. Default: true. -
InpLots
Requested fixed lot size. Default: 0.10. The final volume is normalized to the broker's permitted lot settings. -
InpStopLossPoints
Stop Loss distance in points. Default: 300. Set to 0 to disable. -
InpTakeProfitPoints
Take Profit distance in points. Default: 300. Set to 0 to disable. -
InpExitAtMiddleBand
Enables position closing at the Bollinger Bands middle line. Default: true. -
InpMagicNumber
Identifier used by the EA to manage its own positions. Default: 20260711. -
InpSlippagePoints
Maximum allowed slippage in points. Default: 10. -
InpMaxSpreadPoints
Maximum spread allowed for new entries, measured in points. Default: 50. Set to 0 to disable the spread filter.
Recommended Use
Market behavior and trading conditions may differ between symbols, brokers, account leverage and timeframes.
Users should test the EA in the Strategy Tester and on a demo account before using it in live trading.
Please note that points and pips are not always the same. The actual price distance depends on the number of digits used by the trading symbol.
Important Risk Notice
This product is an automated trading tool. It does not guarantee profits and cannot eliminate trading risk.
Backtest results and past trading performance do not guarantee future results. Users are responsible for selecting suitable symbols, timeframes, parameters, leverage and position sizes.
Testing on a demo account and using conservative risk settings are strongly recommended before live trading.
