Download MetaTrader 5

Traders dynamic index buffers please help

To add comments, please log in or register
prweza
303
prweza  

Hi all , 

 

I'm new in trading and would like to know the buffer numbers for the traders dynamic index fo

red line

yellow line

green line

upper VB line

lower vb line

for example what is xx value below for the red line?

 double red_line = iCustom(NULL,0,"TradersDynamicIndex",13,PRICE_CLOSE,34,1.6185,2,0,7,0,xx,1);

below is part of the tdi code:

---------------------- 

 #property description "Shows trend direction, strength, and volatility."

#property description "Green line  - RSI Price line."

#property description "Red line    - Trade Signal line."

#property description "Blue lines  - Volatility Band."

#property description "Yellow line - Market Base line."


#property indicator_separate_window

#property indicator_buffers 6

#property indicator_level1 32

#property indicator_level2 50

#property indicator_level3 68

#property indicator_levelcolor clrDimGray

#property indicator_levelstyle STYLE_DOT

#property indicator_levelwidth 1

#property indicator_color1 clrNONE

#property indicator_type1  DRAW_NONE

#property indicator_color2 clrMediumBlue

#property indicator_label2 "VB High"

#property indicator_type2  DRAW_LINE

#property indicator_width2 1

#property indicator_style2 STYLE_SOLID

#property indicator_color3 clrYellow

#property indicator_label3 "Market Base Line"

#property indicator_type3  DRAW_LINE

#property indicator_width3 2

#property indicator_style3 STYLE_SOLID

#property indicator_color4 clrMediumBlue

#property indicator_label4 "VB Low"

#property indicator_type4  DRAW_LINE

#property indicator_width4 1

#property indicator_style4 STYLE_SOLID

#property indicator_color5 clrGreen

#property indicator_label5 "RSI Price Line"

#property indicator_type5  DRAW_LINE

#property indicator_width5 2

#property indicator_style5 STYLE_SOLID

#property indicator_color6 clrRed

#property indicator_label6 "Trade Signal Line"

#property indicator_type6  DRAW_LINE

#property indicator_width6 2

#property indicator_style6 STYLE_SOLID


input int RSI_Period = 13; // RSI_Period: 8-25

input ENUM_APPLIED_PRICE RSI_Price = PRICE_CLOSE;

input int Volatility_Band = 34; // Volatility_Band: 20-40

input double StdDev = 1.6185; // Standard Deviations: 1-3

input int RSI_Price_Line = 2;      

input ENUM_MA_METHOD RSI_Price_Type = MODE_SMA;

input int Trade_Signal_Line = 7;   

input ENUM_MA_METHOD Trade_Signal_Type = MODE_SMA;

input bool UseAlerts = false;


double RSIBuf[], UpZone[], MdZone[], DnZone[], MaBuf[], MbBuf[];


int AlertPlayedonBar = 0;


//+------------------------------------------------------------------+

//| Custom indicator initialization function                         |

//+------------------------------------------------------------------+

int init()

{

   IndicatorShortName("TDI(" + IntegerToString(RSI_Period) + "," + IntegerToString(Volatility_Band) + "," + IntegerToString(RSI_Price_Line) + "," + IntegerToString(Trade_Signal_Line) +  ")");

   

   SetIndexBuffer(0, RSIBuf);

   SetIndexBuffer(1, UpZone);

   SetIndexBuffer(2, MdZone);

   SetIndexBuffer(3, DnZone);

   SetIndexBuffer(4, MaBuf);

   SetIndexBuffer(5, MbBuf);

   

   return(0);

}


prweza
303
prweza  
prweza:
...

please help.
Alain Verleyen
Moderator
33611
Alain Verleyen  
prweza:
please help.
After 25 minutes you are already impatient ? Wait for a reply and be patient.

Mladen Rakic
64143
Mladen Rakic  
prweza:

Hi all , 

 

I'm new in trading and would like to know the buffer numbers for the traders dynamic index fo

red line

yellow line

green line

upper VB line

lower vb line

for example what is xx value below for the red line?

 double red_line = iCustom(NULL,0,"TradersDynamicIndex",13,PRICE_CLOSE,34,1.6185,2,0,7,0,xx,1);

below is part of the tdi code:

---------------------- 

 #property description "Shows trend direction, strength, and volatility."

#property description "Green line  - RSI Price line."

#property description "Red line    - Trade Signal line."

#property description "Blue lines  - Volatility Band."

#property description "Yellow line - Market Base line."


#property indicator_separate_window

#property indicator_buffers 6

#property indicator_level1 32

#property indicator_level2 50

#property indicator_level3 68

#property indicator_levelcolor clrDimGray

#property indicator_levelstyle STYLE_DOT

#property indicator_levelwidth 1

#property indicator_color1 clrNONE

#property indicator_type1  DRAW_NONE

#property indicator_color2 clrMediumBlue

#property indicator_label2 "VB High"

#property indicator_type2  DRAW_LINE

#property indicator_width2 1

#property indicator_style2 STYLE_SOLID

#property indicator_color3 clrYellow

#property indicator_label3 "Market Base Line"

#property indicator_type3  DRAW_LINE

#property indicator_width3 2

#property indicator_style3 STYLE_SOLID

#property indicator_color4 clrMediumBlue

#property indicator_label4 "VB Low"

#property indicator_type4  DRAW_LINE

#property indicator_width4 1

#property indicator_style4 STYLE_SOLID

#property indicator_color5 clrGreen

#property indicator_label5 "RSI Price Line"

#property indicator_type5  DRAW_LINE

#property indicator_width5 2

#property indicator_style5 STYLE_SOLID

#property indicator_color6 clrRed

#property indicator_label6 "Trade Signal Line"

#property indicator_type6  DRAW_LINE

#property indicator_width6 2

#property indicator_style6 STYLE_SOLID


input int RSI_Period = 13; // RSI_Period: 8-25

input ENUM_APPLIED_PRICE RSI_Price = PRICE_CLOSE;

input int Volatility_Band = 34; // Volatility_Band: 20-40

input double StdDev = 1.6185; // Standard Deviations: 1-3

input int RSI_Price_Line = 2;      

input ENUM_MA_METHOD RSI_Price_Type = MODE_SMA;

input int Trade_Signal_Line = 7;   

input ENUM_MA_METHOD Trade_Signal_Type = MODE_SMA;

input bool UseAlerts = false;


double RSIBuf[], UpZone[], MdZone[], DnZone[], MaBuf[], MbBuf[];


int AlertPlayedonBar = 0;


//+------------------------------------------------------------------+

//| Custom indicator initialization function                         |

//+------------------------------------------------------------------+

int init()

{

   IndicatorShortName("TDI(" + IntegerToString(RSI_Period) + "," + IntegerToString(Volatility_Band) + "," + IntegerToString(RSI_Price_Line) + "," + IntegerToString(Trade_Signal_Line) +  ")");

   

   SetIndexBuffer(0, RSIBuf);

   SetIndexBuffer(1, UpZone);

   SetIndexBuffer(2, MdZone);

   SetIndexBuffer(3, DnZone);

   SetIndexBuffer(4, MaBuf);

   SetIndexBuffer(5, MbBuf);

   

   return(0);

}


Read the #property indicator_color(nnn) lines, see the color name, subtract 1 from the number before the color name *the "(nnn) part of the #property indicator_color(nnn)) and that is your buffer number
prweza
303
prweza  
Thanks.
whroeder1
16306
whroeder1  
  1. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum
  2. #property indicator_color6 clrRed
    #property indicator_label6 "Trade Signal Line"
    #property indicator_type6  DRAW_LINE
    You should have already figured out that the red line is buffer index five.
  3. Use SRC. Why didn't you edit your original post as requested?
To add comments, please log in or register