Problem with Indicator Buffers defined in strategie.

Examples step by step how to make your own automated strategy or user indicator
Message
Author
pmpa200712
Posts: 3
Joined: Thu Oct 02, 2014 10:01 am

Problem with Indicator Buffers defined in strategie.

#1 Postby pmpa200712 » Thu Oct 02, 2014 1:26 pm

I have defined indicator Bollinger Bands that has three(3) buffers, like that:

Indbb := CreateIndicator(Symbol, PERIOD_M15, 'BollingerBands', '20,2,0,Close');

I haved defined that It is in Zero Buffer, like that:

SetIndicatorBuffStyle(Indbb, 0, psSolid, 1, clYellow);

Index buffer in List of indicator's parameter of help are:

0 Top band buffer
1 Central band buffer
2 Bottom band buffer

so, when I get value indicator doesn´t work Fine for Central Band buffer and Bottom Band buffer. I get values like that:

bbtop := GetIndicatorValue(Indbb, 0, 0);
bbcentral := GetIndicatorValue(Indbb, 1, 0);
bbbottom := GetIndicatorValue(Indbb, 2, 0);

what is it wrong?

Thanks You for your help.

User avatar
neHcioHep
Posts: 18
Joined: Sat Nov 21, 2009 5:49 pm

Re: Problem with Indicator Buffers defined in strategie.

#2 Postby neHcioHep » Tue Oct 07, 2014 12:57 pm

What is wrong?
You get values from other buffers or something other?

pmpa200712
Posts: 3
Joined: Thu Oct 02, 2014 10:01 am

Re: Problem with Indicator Buffers defined in strategie.

#3 Postby pmpa200712 » Tue Oct 07, 2014 5:13 pm

Thanks,

I understand that second values correspond to bars and third values correspond index buffer.


Return to “Programming lessons”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests