Code: Select all
char argBuff[1000]; // argument buffer
// define CreateIndicator() parameters argument
sprintf(argBuff, "%d;%f;0;Close", Period, stdDev, "BollingerBands");
// create the indicator and get its handle
indBB = CreateIndicator(currency, timeFrame, "BollingerBands", argBuff);
where according to the API doc. the BollingerBands function is defined as follows:
Bollinger Bands ='BollingerBands'
'<Period: integer>; <Deviation: double>; <Shift: integer>; <ApplyToPrice: string>'
'8;2.00;0;Close'
0=Top band buffer
1=Central band buffer
2=Bottom band buffer
I get an illegal value displayed in the MA Type option of the Bollinger Band plotted on the chart. Obviously there must be a way to set the MA Type of the Bollinger Band using CreateIndicator() no? So I am asuming the API doc. is wrong again. Can you please confirm?
Peter
ps: oh yeah and I can see that the API doc is wrong in specifying the buffer number to use for each of the bands. Come on guys how is one supposed to be able to code with documentation like this. Haven't these issues been brought up already? This is basic stuff. ....