• 概述
  • 评论
  • 评论
  • 新特性

Expert Advisor Bollinger Bands and RSI

The Expert Advisor is based on the Bollinger Bands and RSI indicators and designed for the Brazilian stock market (BMF&Bovespa).

This EA trades in three modes:

  1. only buy order;
  2. only sell order;
  3. both buy and sell orders.

The rules for generating buy and sell signals are described below. The buy/sell signal is generated when the EA identifies one of the two rules.

Rules for the buy signal:

  1. When the Relative Strength Index (RSI) crosses the buy line (Buy Trigger) from bottom to top.
  2. When the close price of the penultimate formed candle occurs below the Lower Bollinger Band, the close price of the last formed candle occurs above the Lower Bollinger Band and the open price of the current candle (in formation) occurs above the Lower Bollinger Band.

Rules for the sell signal:

  1. When the Relative Strength Index (RSI) crosses the sell line (Sell Trigger) from top to bottom.
  2. When the close price of the penultimate formed candle occurs above the Upper Bollinger Band, the close price of the last formed candle occurs below the Upper Bollinger Band and the open price of the current candle (in formation) occurs below the Upper Bollinger Band.

Additionally, in order to prevent that the EA trades when the price volatility is low, the buy/sell signal is blocked whether the distance between the Upper and Lower Bollinger Bands is lower than a specified value.


Inputs

  • Order Type: Sell, Buy or Buy and Sell.
  • Take Profit - Order to Buy: Take profit expected for a long position.
  • Take Profit - Order to Sell: Take profit expected for a short position.
  • Stop Loss: Maximum permissible loss in a trade.
  • Step for Trailling Stop: When the difference between the order open price and the current price reaches this value, the stop loss is moved in the same proportion.
  • Minimum Gain for Closing Position by Indicators: the EA will close an open position using the signal generated by the indicators only if the gain is greater than this value.
  • Maximum Loss per Day: the EA stops trading if the difference between the current balance and the initial balance is lesser or equal to this value.
  • Target of Daily Gain: the EA stops trading if the difference between the current balance and the initial balance is greater or equal to this value.
  • Volume to Trade: Quantity that user wants to trade.
  • Period - Bollinger Bands: Timeframe applied in the calculation of Bollinger Bands.
  • Std. Deviation - Bollinger Bands: Standard deviation applied in the calculation of Bollinger Bands.
  • Minimum Bollinger Width: Minimum difference between the Upper and Lower Bollinger Bands required to trade.
  • Period - RSI: Timeframe applied in the calculation of the RSI indicator.
  • RSI - Buy Trigger: When the RSI indicator drops drown below this level and then increases above it, a buy signal is generated.
  • RSI - Sell Trigger: When the RSI indicator increases above this level and then falls below it, a sell signal is generated.
  • Start Trading: Time to start trading.
  • Finish Trading: Time to finish trading.
  • Shutdown EA: remove the EA from the chart when it stops trading.
  • EA Magic Number: the EA's ID number.
  • Brokerage Fee: The fee charged by the broker.
无评论
版本 1.2 - 2016.01.08
There was an error in the process of removing the EA from the chart. This error was related to the RSI indicator. The problem was fixed.
A new parameter was included in order to prevent the EA from opening new positions when the spread is greater than a user-defined value.
版本 1.1 - 2015.12.09
Some users have complained that this EA was trading a symbol different from the one in the chart where it was attached. In response to this, a field where the users can specify the symbol they want to trade was added.

Now, the EA automatically adds the indicators it uses to the chart.

Other small bugs were fixed.

If any other problem is found, please report it to me.