Access to Bollinger Bands Widht array in main code

 

I'm having difficulties to generate and access a BBandsWidht ARRAY of a period in my main code, as it's not a built in indicator.

Tried to use iCustom but it doesn't allow me to pass the array.

Does anybody know how to deal?

 Thanks 

 
mql5?
 
Vasyl Nosal:
mql5?

Yes. I'm new to MQL5.

I'm using a base class and derived classes to return indicators values.

As BollingBandsWidth is not a builtin indicator I'm not able to copy it's buffer with CopyBuffer() and send it.

Att: BollingBandsWidth is equal to (BB Upper Band) - (BB Lower Band).

Any clue?

Thks a lot

 
danielarges:

Yes. I'm new to MQL5.

I'm using a base class and derived classes to return indicators values.

As BollingBandsWidth is not a builtin indicator I'm not able to copy it's buffer with CopyBuffer() and send it.

Att: BollingBandsWidth is equal to (BB Upper Band) - (BB Lower Band).

Any clue?

Thks a lot

obv indicator example.

int OBV_h;
void OnInit()
  {
//obv handle
 OBV_h=iOBV(Symbol(),0,count_volumes);
  }

 
void OnTick()
{
Alert(OBVs_f(1));
}


double OBVs_f(int CC)
{
double obv[];
CopyBuffer(OBV_h,0,CC,1,obv);

return(obv[0]);
}
 
Vasyl Nosal:

obv indicator example.

Thanks again Nosal. But it seems I can't access iIndicator function because BBW is not a built in indicator. CopyBuffer works just with buit in I guess..
 
danielarges:
Thanks again Nosal. But it seems I can't access iIndicator function because BBW is not a built in indicator. CopyBuffer works just with buit in I guess..

Bolinger is in mt4.

if you need custom

OBV_h=iOBV(Symbol(),0,count_volumes);
change to
OBV_h=iCustom(Symbol(),0,name);

	          
Reason: