Bulls Power : My value not in line with the indicator's current value

 

Hi there 

I really hope someone can help. 

The code below...I run it (it looks correct to me), 
but I get an incorrect value 
(see the value on the bottom window for the Bears Indicator - and top left is the Comment that I display, of the current value that I have) 
For some reason they are not the same - does anyone have an idea why not? 


// 4. Bears Power 
//=============== 
double myPriceArray[]; 

int BearsPowerDefinition = iBearsPower(_Symbol,_Period, 13); 

ArraySetAsSeries(myPriceArray,true); 
CopyBuffer(BearsPowerDefinition,0,0,3,myPriceArray); 

double BearsPowerValue=(myPriceArray[0]); 

Comment("Bears Power " , BearsPowerValue);

Please see attached image

Or does anyone have the code to call a Bulls Power Indicator in MQL5 that returns the correct value??

 
  1. When you post code please use the SRC button! Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum

  2. Check your return codes for errors and report them. (iBearsPower and CopyBuffer)
              What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
              Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles

  3. Try the ASAS after the copy.
 
whroeder1:
  1. When you post code please use the SRC button! Please edit your post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum

  2. Check your return codes for errors and report them. (iBearsPower and CopyBuffer)
              What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
              Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles

  3. Try the ASAS after the copy.

Thank you