The use of technical indicators in the adviser TradeBuilderMT5

6 October 2018, 08:42
Sergey Deev
0
165

The TradeBuilderMT5 Expert Advisor is designed to build a trading system based on an arbitrary set of technical MT5 indicators.

Previous article: Using CancelBuy and CancelSell Signals

Configuring the use of technical indicators is made by selecting them from the drop-down list and configuration parameters:

  1. indicator selection
  2. time interval
  3. parameter string
  4. chart bar (0-current bar, 1-last closed bar, etc.)
  5. line graphics.

The most critical is the indicator parameter string. If the line does not have at least one parameter, the indicator is initialized with an error and we get the following in the log:

Naturally, the signal with such an error will not work. To determine the parameter string, refer to the mql5 technical indicators documentation. Here, choosing the required indicator, we get a description, such as the following:

int  iMA( 
   string               symbol,            // имя символа 
   ENUM_TIMEFRAMES      period,            // период 
   int                  ma_period,         // период усреднения 
   int                  ma_shift,          // смещение индикатора по горизонтали 
   ENUM_MA_METHOD       ma_method,         // тип сглаживания 
   ENUM_APPLIED_PRICE   applied_price      // тип цены или handle 
   );

We must enter a comma-separated number of all parameters, except symbol and period. In this case, for the indicator MA - 4 parameters.

Below are the default parameter lines for each indicator and line numbers.

ИндикаторСтрока параметровНомера линий
AC

AD

ADX140 - MAIN_LINE, 1 - PLUSDI_LINE, 2 - MINUSDI_LINE
ADXW140 - MAIN_LINE, 1 - PLUSDI_LINE, 2 - MINUSDI_LINE
ALLIGATOR13,8,8,5,5,3,2,40 - GATORJAW_LINE, 1 - GATORTEETH_LINE, 2 - GATORLIPS_LINE
AMA15,2,30,0,0
AO

ATR14
BANDS20,0,2.0,00 - BASE_LINE, 1 - UPPER_BAND, 2 - LOWER_BAND
BEARS13 
BULLS13  
BWMFI0 
CCI14,5 
CHAIKIN3,10,1,0 
CUSTOMимя_индикатора *** 
DEMA14,0,0  
DEMARKER14 
ENVELOPES14,0,0,0,0.10 - UPPER_LINE, 1 - LOWER_LINE
FORCE 13,0,0  
FRACTALS 0 - UPPER_LINE, 1 - LOWER_LINE
FRAMA14,0,0 
GATOR13,8,8,5,5,3,2,40 - UPPER_HISTOGRAM, 1- color of the upper histogram, 2 - LOWER_HISTOGRAM, 3- bottom histogram color
ICHIMOKU9,26,520 - TENKANSEN_LINE, 1 - KIJUNSEN_LINE, 2 - SENKOUSPANA_LINE, 3 - SENKOUSPANB_LINE, 4 - CHIKOUSPAN_LINE
MA10,0,0,0 
MACD12,26,9,00 - MAIN_LINE, 1 - SIGNAL_LINE 
MFI14,0 
MOMENTUM14,0  
OBV0 
OSMA12,26,9,0  
RSI14,0  
RVI10  
SAR0.02,0.2 
STDDEV20,0,0,0 
STOCHASTIC5,3,3,0,00 - MAIN_LINE, 1 - SIGNAL_LINE
TEMA14,0,0 
TRIX14,0  
VIDYA15,12,0,0 
VOLUMES 

*** A custom indicator CUSTOM as parameters must contain at least one parameter - its name. In accordance with the rules of TradeBuilderMT5, this parameter must be framed with single quotes.

In the next article we will look at the use of a custom indicator in TradeBuilderMT5.


Share it with friends: