How to code cci deviation

Calculate the mean deviation by subtracting the MA from the typical price for the last 20 periods. Sum the absolute values (ignore minus signs) of these figures and then divide by 20 . Insert the most recent typical price, the MA, and the mean deviation into the formula to compute the current CCI reading.

how to code cci deviation in amibroker

please help

@needhelp, welcome to this Forum.

Unfortunately I do not understand what you are looking for.

The CCI aka. Commodity Channel Index is readily available in AmiBroker; please, see the documentation: AFL Function Reference - CCI

Why do you want to calculate it yourself?
Is it certainly possible to replicate it in your formula, following the steps indicated (a good example is here) but I do not see the point of doing it.

thank you for your reply

i find it here

https://forum.amibroker.com/t/help-with-calculation-of-cci-using-loops/25087/10

it was hard for me to get it
and the calculate i will use it with other idea

again thank you for your reply

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.