Bollinger Stoch Grid
- Experts
- Igor Do Carmo Moreira
- Versione: 8.88
- Attivazioni: 5
**Bollinger Stoch Grid** is a fully automated Expert Advisor (EA) that combines classic indicators with a powerful grid/martingale management strategy.
The robot's core logic is based on the synergy between three classic indicators. Instead of blindly opening grid positions, the EA uses a combination of **Bollinger Bands** and the **Stochastic Oscillator** to identify high-probability exhaustion and reversal points. To further increase safety and accuracy, it utilizes a **200-period Moving Average (MA 200)** as a primary trend filter, ensuring that buy trades are preferably taken above the average and sell trades below it.
This robot was designed to be 100% configurable, allowing the trader to fine-tune the strategy to suit different assets (indices, forex, crypto) and timeframes, whether in Day Trade or Swing Trade mode.
---
**Main Features and Advantages**
* **Intelligent Entry Signals:** Entries are not random. They are strictly filtered by Stochastic overbought/oversold conditions that occur near the Bollinger Bands. This filters out significant market "noise" and false signals that simpler robots often take, focusing only on higher-probability entries.
* **Trend Filter (MA 200):** The robot "knows" the main trend and avoids fighting it. Trading with the trend is a cornerstone of technical analysis, and this filter helps keep your operations aligned with the "smart money," increasing the grid's chances of success.
* **Grid Management (Grid/Martingale):** Strategically manages losing positions by adding new positions as the price moves against the initial order, lowering (or raising) the overall average price. The goal is to close all positions in profit when the market has a small reversal, without needing the price to return to the original entry point.
* **Multiple Exit Options:** The robot does not rely solely on the grid's target. It includes:
* **Fixed Take Profit (in Points):** For quick and predefined profit targets.
* **Dynamic Take Profit (Opposite Band):** Perfect for volatile markets, where the target automatically adjusts as the bands expand or contract.
* **Automatic Breakeven:** Moves the Stop Loss to the entry price as soon as the trade hits a minimum profit.
* **Trailing Stop:** Protects earned profits by "following" the price as it moves in your favor.
* **Partial Exit:** Realizes a portion of the profit when an initial target is met, reducing the risk on the remaining position.
* **Complete Risk Management:** Includes a Fixed Stop Loss (in points) for the grid, which acts as your ultimate "safety net," defining the maximum acceptable loss for a full grid. It also features Daily Loss/Profit Limits (in currency) and trading time filters to protect your capital.
* **Swing Trade Mode:** A single button (`true`/`false`) that disables all time filters (trading/closing hours) and daily limits, allowing the robot to operate 24/7 and capture larger price movements that last for several days, ideal for Forex and Cryptocurrencies.
* **Volume Persistence:** The robot saves the current martingale multiplier even if the platform is closed, the VPS restarts, or MetaTrader crashes. Upon restart, it knows exactly what the next order's volume should be, ensuring perfect continuity of the strategy without breaking the cycle.
---
**!!! IMPORTANT RISK WARNING !!!**
Strategies utilizing **Grid** and/or **Martingale** are inherently **HIGH RISK**. A strong, fast, and continuous market move against your positions (such as during high-impact news) can lead to a significant drawdown or, in the worst-case scenario, the **loss of all account capital.**
Bollinger Stoch Grid is designed to mitigate this risk with smart entry filters and a fixed Stop Loss, but it **does NOT** eliminate the risk. No configuration can predict "Black Swan" events.
* **NEVER** use on a live account without first testing it exhaustively in the Strategy Tester.
* **DO NOT** use a high martingale multiplier (above 2.0) unless you 100% understand what you are doing and the exponential risks involved.
* **ALWAYS START** with the minimum initial lot size (`m_volume = 0.01`) and use capital you can afford to lose.
* Past performance (backtests) does not, in any way, guarantee future results.
---
**Usage Recommendations**
1. This robot is powerful, but it is not magical. It shines when it is **optimized** for a specific asset and timeframe. There is no "magic setting" that works for all assets.
2. Each market (like Gold, Indices, Oil, or Forex) has its own "personality" (volatility and behavior). Spend time in the Strategy Tester (Ctrl+R) in "Optimize" mode to find the configuration that best suits your preferred asset and risk profile.
3. Use the Strategy Tester to find the best parameters (Bollinger period, deviation, grid distance, multiplier) for your preferred asset (e.g., XAUUSD, EURUSD, WDO, WIN).
4. Save your optimized parameters as a `.set` file and use the robot with that configuration, which you have validated.
---
---
**Input Parameters**
(0. General Settings)
* **m_usar_modo_swing_trade:** `true` disables daily limits and start/end/close time filters.
* **m_timeframe:** The timeframe on which the indicators (Bollinger, MA, Stoch) will be calculated.
(1. Strategy & Trigger)
* **m_tipo_entrada:** Defines the trigger: `ON_TOUCH` (on band touch), `ON_CLOSE` (on candle close beyond the band), or `ON_BREAKOUT` (on breakout).
* **m_modo_tp:** Defines the target: `FIXED_POINTS` (fixed points) or `OPPOSITE_BAND` (dynamically follows the opposite band).
(2. Risk Settings)
* **m_magic:** Magic number for the EA (essential to avoid conflicts with other robots).
* **m_volume:** Initial lot size for the first order.
* **m_sl_pontos:** GLOBAL Stop Loss (in points). This is the 'emergency stop' for the entire grid, measured from the first order (anchor).
* **m_tp_fixo_pontos:** Take Profit in points (used only if `m_modo_tp` = `FIXED_POINTS`).
(3. Breakeven Management)
* **m_usar_breakeven:** `true` to activate breakeven (move SL to 0-0).
* **m_breakeven_gatilho_pontos:** Profit points required to trigger the breakeven.
* **m_breakeven_lucro_pontos:** "Buffer" points (profit) that the SL will be placed above/below the entry price.
(4. Trailing Stop Management)
* **m_usar_trailing_stop:** `true` to activate the Trailing Stop (overrides Breakeven if active).
* **m_trailing_gatilho_pontos:** Minimum profit for the Trailing Stop to start "following" the price.
* **m_trailing_distancia_pontos:** Distance (in points) that the SL will trail behind the price.
(5. Partial Exit Management)
* **m_usar_saida_parcial:** `true` to enable partial profit-taking.
* **m_saida_parcial_gatilho_pontos:** Profit points to trigger the partial close.
* **m_saida_parcial_percentual:** Percentage of the lot to close (e.g., 50.0 for 50%).
(6. Martingale Strategy (VERY HIGH RISK))
* **m_usar_martingale:** `true` to turn on the grid system. (If `false`, the robot will trade with a single order).
* **m_martingale_modo:** `GRID_MODE` (opens pending orders) or `AFTER_STOP_LOSS` (increases lot size *only* after a stop loss, does not grid).
* **m_martingale_multiplicador:** Lot multiplier for subsequent orders (e.g., 1.6). Values above 2.0 exponentially increase risk.
* **m_max_volume_martingale:** The maximum lot size the robot can reach (absolute safety lock).
* **m_persistir_volume_entre_dias:** `true` to save the multiplier if MT5 is closed.
* **m_grade_niveis:** Maximum number of orders in the grid (including the first one).
* **m_grade_distancia_pontos:** Distance (in points) between grid orders.
* **m_grade_tp_global_pontos:** Target (in points) used if `m_modo_tp` is `FIXED_POINTS`, measured from the *last* order opened.
(7. Bollinger Bands Settings)
* **m_bb_periodo:** Bollinger Bands Period (e.g., 20).
* **m_bb_desvio:** Bands Deviation (e.g., 2.0).
* **m_bb_shift:** Bands Shift.
* **m_periodo_media_lenta:** Period of the trend-filtering Moving Average (e.g., 200).
* **m_metodo_media_lenta:** MA calculation method (e.g., SMA, EMA).
(8. Stochastic Oscillator Filter)
* **m_usar_filtro_stoch:** `true` to enable the Stochastic entry filter.
* **m_stoch_k_period:** %K Period (e.g., 14).
* **m_stoch_d_period:** %D Period (e.g., 3).
* **m_stoch_slowing:** Slowing (e.g., 3).
* **m_stoch_ma_method:** MA Method for the Stochastic.
* **m_stoch_nivel_sobrecompra:** Overbought level (e.g., 80.0).
* **m_stoch_nivel_sobrevenda:** Oversold level (e.g., 20.0).
(9. Trading Window & Frequency)
* **m_hora_inicio:** Time to start trading (e.g., "09:15").
* **m_hora_fim:** Time to stop opening new trades (e.g., "17:00").
** Bollinger Stoch Grid ** é um Expert Advisor (EA) totalmente automatizado que combina indicadores clássicos com uma poderosa estratégia de gerenciamento de grade / martingale.
* **m_cooldown_minutes:** Minutes to wait before opening a new trade after closing one.
(10. Daily Limits)
* **max_deals_por_dia:** Limit of trades per day (0 = unlimited).
* **max_daily_profit:** Daily profit target ($). (0 = unlimited).
* **max_daily_loss:** Daily loss limit ($). (0 = unlimited).
(11. Advanced Order Management)
* **m_filling:** Order Filling Type.
* **m_cooldown_minutes:** Minutos para esperar antes de abrir uma nova negociação após fechar uma.
