CCI Problems values between real and BT

 

I have a problem. When i started to write my EA i found a serious problem: all indicators were working right less iCCI

I tested macd, rsi, stoch, .... and i did over m1, m5, m15, m30,... i was checking real values and BT and all them works perfectly, but cci no.

On pic i show a example. 

Bottom is BT results and you can see that rsi is ok but cci have a serious difference, and some times real is over 100(down -100) and BT no.

With that problem it's impossible to test nothing. i test  differents plataforms but same problem. 

Somebody can help me please? if i can't find solution one year work is out :::(

i attach the small EA i used 

Files:
testing.png  105 kb
 

Make sure that the CCI indicator on the chart is using Close price.

What is "BT"?

In future please post in the correct section

I will move your topic to the MQL4 and Metatrader 4 section.