Download MetaTrader 5
To add comments, please log in or register
Download MetaTrader 5 mobile version and trade from anywhere in the world!
Daniel Arges
66
Daniel Arges 2016.03.06 20:42 

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 

Vasyl Nosal
18531
Vasyl Nosal 2016.03.06 20:43  
mql5?
Daniel Arges
66
Daniel Arges 2016.03.06 22:08  
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

Vasyl Nosal
18531
Vasyl Nosal 2016.03.06 22:46  
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]);
}
Daniel Arges
66
Daniel Arges 2016.03.07 00:23  
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..
Vasyl Nosal
18531
Vasyl Nosal 2016.03.07 00:58  
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);
/
To add comments, please log in or register