4. 11. 2021

5 5

Choppiness Index

Formula

CI = 100 * LOG10( SUM(ATR(1), n) / ( MaxHi(n) – MinLo(n) ) ) / LOG10(n)

CI=(100LOG10(n1ATR)(MaxHigh(n)MinLow(n))LOG10(n)

where:

  • n = User defined period length.
  • LOG10(n) = base-10 LOG of n
  • ATR(1) = Average True Range (Period of 1)
  • SUM(ATR(1), n) = Sum of the Average True Range over past n bars
  • MaxHigh(n) = The highest high over past n bars
  • MinLow(n) = The lowest low over past n bars

 

Sources:

 

Indicator is implemented for: MT4/MT5/Tradestation/ Multicharts

 

Indicator is non directional so original rule is the opposite rule too.

 

We have added these conditions:

  • Choppiness index is above/below level
  • Choppiness index crosses above/below level
  • Choppiness Index is rising/falling

 

How to import custom indicators to SQX: https://strategyquant.com/doc/programming-for-sq/import-export-custom-indicators-and-other-snippets/

Subscribe
Notify of
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Emmanuel
20. 12. 2021 3:17 pm

Excellent !!! I was looking for an indicator like this one !!!!!!!
Thank you very much Clonex for this awesome work !!!!!!

Emmanuel
20. 12. 2021 4:12 pm

In the log of SQX, I am getting the same error many times :

17:09:17.605 [Nonblocking computeThread – 2 – Builder_2] ERROR ConditionsNegater – Cannot find field Null in block ChoppinessIndexRising
17:09:26.947 [Nonblocking computeThread – 1 – Builder_1] ERROR ConditionsNegater – Cannot find field Null in block ChoppinessIndexFalling

How can I fix this error ?
(The log is slowing the research of SQX as it is writing to the hard drive)

eastpeace
28. 5. 2022 1:51 pm

Great job. Thank you clonex

innggo
8. 7. 2023 8:09 am

Thank you Clonex!