Choppiness Indicator for ThinkorSwim

tomsk

Well-known member
VIP
For those interested, here is a Choppiness Indicator that Mobius posted several years ago.
This would be helpful for those who'd like another measure of defining trend, chop, etc

Code:
# Choppiness Indicator
# Mobius
# V001.03.2012

#Hint: The Market is considered TRENDING when the index is below 38.2 \n The Market is considered CHOPPY when the index is above 61.8. \n A move above the 38.2 Level indicates a possible end to a trend and a move below 61.8 indicates a possible breakout from a period of consolidation.


declare lower;
input Length   = 14;
input Signal   =  3;
input Choppy   = 62;
input MidLine  = 50;
input Trending = 38;
input CIx = {default CIB, CIA};
   def CIA = 100 * log( Sum( TrueRange(high, close, low), Length))
             / ( Highest(close[1], Length) - Lowest(close[1], Length))
             / log(Length);
   def CIB = ((log(Sum(TrueRange(high, close, low), Length) /
             (Highest(if high >= close[1] then high else
             close[1], Length) -
             Lowest( if low <= close[1] then low else close[1], Length)))
             / log(10)) / (log(Length)/log(10))) * 100;
  plot CI = if CIx == CIx.CIB then CIB else CIA;
       CI.SetDefaultColor( Color.White);
  plot CIavg = average(CI, Signal);;
       CIavg.setdefaultColor(Color.Green);
  plot Chop = Choppy;
       Chop.SetDefaultColor(Color.red);
  plot Mid = MidLine;
       Mid.SetDefaultColor(Color.gray);
  plot Trend = Trending;
       Trend.SetDefaultColor(Color.green);
AddLabel(yes, if CI > MidLine then "CHOPPY " else "TRENDING ", if CI < Trend then Color.Green else if CI > Trend and CI < MidLine then Color.Light_Green else if CI > MidLine and CI < Chop then Color.Yellow else Color.Red);
Addcloud(Mid, Chop, Color.Green, Color.Yellow);
Addcloud(Trend, Mid, Color.Yellow, Color.Light_Green);
# END CODE #
 
This is actually looking really good. Has anybody else tried it yet? I have tried using ADX in the past but too many good moves were missed, so happy to have this alt.
 

surferdude

New member
VIP
This is actually looking really good. Has anybody else tried it yet? I have tried using ADX in the past but too many good moves were missed, so happy to have this alt.
I use this indicator all the time and just like you had used the ADX to identify trends/ending trends and chop. I still use the ADX but beginning to use the Choppiness Index and other FE variations because it is quicker than the ADX and nowhere near as laggy as the ADX
 

Similar threads

Top