• Overview
  • Reviews
  • Comments

Grid and Bollinger Bands

This is a grid Expert Advisor. It has several trading strategies based on the Bollinger Bands and RSI indicators. The virtual trailing stop, stop loss, take profit levels can be set pips, in the deposit currency or as a percentage of the balance. Depending on the settings, different orders may be opened for diversifying risks. Their closure can be either an oppositely directed or unidirectional basket of orders.

The orders grid is adaptive, only market orders are used in it. If the price moves the distance of OrderOpenStop+OrderOpenStep in the direction opposite to the opened order, then a virtual level for opening a new order is set. If the price continues moving in the opposite direction from the open order, the previously set order opening level is trailed after the price. If the price touches or crosses a given level, a deal is opened. This achieves the most profitable price for opening positions in the order grid. The lot size of the orders in the grid is calculated as: specified lot per 1000 units of the base currency, multiplied by the coefficient or with the specified additional lot.


Strategies

  • Strategy - select the strategy;
    • BollingerBands - the main idea of this strategy is that after breaking the upper or lower line, the price tends to go back to the middle line of the indicator. Buys signals are generated when the lower moving average is broken. Sell signal — breakout of the upper moving average.
    • RSI - buy signals are generated when the RSI line crosses the RSIBuyLevel level upwards. Sell — RSI crosses the RSISellLevel level downwards.
    • BandsAndRSI - is a strategy based on BollingerBands combined with RSI.

If requested, more strategies based on the Bollinger Bands and RSI indicators can be implemented in the future.


Indicator Parameters

  • TimeFrame - working timeframe.
  • BBPeriod - MACD period.
  • BBDeviation - the number of standard deviations.
  • RSIPeriod - RSI period.
  • AppliedPrice - price type.
    • PRICE_CLOSE - Close price.
    • PRICE_OPEN - Open price.
    • PRICE_HIGH - High price for the period.
    • PRICE_LOW - Low price for the period.
    • PRICE_MEDIAN - median price, (high+low)/2;
    • PRICE_TYPICAL - typical price, (high+low+close)/3;
    • PRICE_WEIGHTED - weighted average price, (high+low+close+close)/4;
  • Shift - MACD shift.
  • RSIBuyLevel - RSI level for buying.
  • RSISellLevel - RSI level for selling.


Main Parameters

  • LotsFor1000 - initial lot size per 1000 units of base currency.
  • LotMultiplier - lot multiplier for subsequent orders; if - 1, does not change.
  • AddLot - additional lot for subsequent orders; if - 1, does not change.
  • TradeMethod - trading method:
    • Unidirectional - trading is performed in one direction.
    • Multidirectional - trading can be performed in two directions simultaneously.
  • OrderOpenStop - distance from the last opened order to place the order grid.
  • OrderOpenStep - distance from the current price to set the level for opening a new order in the order grid.
  • LevelsMethod - method for setting take profit/stop loss.
    • Unidirectional - separate, for the basket of unidirectional orders.
    • Multidirectional - common, for the basket of oppositely directed orders.
  • LevelsMode - select the take profit/stop loss mode:
    • Pips - in pips.
    • Money - in the deposit currency.
    • Percent - in balance %.
  • StopLoss - stop loss; not used if -1.
  • TakeProfit - take profit; not used if -1.
  • TrailingMethod - trailing stop operation method:
    • Unidirectional - close the basket of unidirectional orders.
    • Multidirectional - close the basket of oppositely directed orders.
  • TrailingMode - select the trailing stop mode:
    • Pips - in pips.
    • Money - in the deposit currency.
    • Percent - in balance %.
  • TrailingStop - trailing stop distance.
  • TrailingStep - trailing step.
  • MagicNumber - EA ID, if -1 the EA will work with all orders.
  • Comment - comment to trades.
No reviews