# Converting Chop Index Study to Scan Stocks below 38.2 Index

Category:
0
0

Hi Pete, I was wondering if you can provide a custom script to convert this study into a scan. Thanks.

declare lower;
# Inputs: Len(13);
input Len = 14;
input CIx = {default CI3, CI2};
#Plot1(100 * Log(Summation(TrueRange,Len)/(Highest(C[1],Len) – Lowest(C[1],Len))/Log(Len)), “CI2”);
def CI2 = 100 * log( Sum( TrueRange(high,close,low),Len)
) / ( Highest(close[1],Len) – Lowest(close[1],Len))
/ log(Len);
def CI3 = ( ( log(Sum(TrueRange(high,close,low),Len) /
(
Highest(if high >= close[1] then high else
close[1],Len) –
Lowest( if low <= close[1] then low else close[1],Len)
)
) / log(10)
) / (log(Len)/log(10))
) * 100;
plot CI = if CIx == CIx.CI3 then CI3 else CI2;
CI.AssignValueColor( Color.YELLOW);
# Plot2(60,”60Li”);
plot line60 = 61.8;
line60.AssignValueColor(Color.White);
# Plot3(35,”35Li”);
plot line35 = 38.2;
line35.AssignValueColor(Color.White);

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on October 14, 2019 8:02 am
119 views
 ▲ 0 ▼ ✔ Private answer This should do it: ```input length = 14; input ciX = {default CI3, CI2}; def ci2 = 100 * log( Sum(TrueRange(high, close, low), length)) / (Highest(close[1],length) – Lowest(close[1], length)) / log(length); def ci3 = ((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; def ci = if ciX == ciX.CI3 then ci3 else ci2; plot scan = ci < 38.2;``` Marked as spam Posted by Pete Hahn (Questions: 37, Answers: 4091) Answered on October 14, 2019 11:05 am