hecate

h chop filter v1.1

Chop Filter based on Chaikin's Volatility but faster with 0 lag.
Use it to filter out (in brown) when it is not worth trading as we are in chop zone.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
study(title="h chop filter v1.1", shorttitle="h chop filter", overlay=true)
//Example filtering out with a threshold of 0.003 -> http://i.imgur.com/kP7OI1o.png
//hecate tx aswell to zmm20
len = input(10, title="Period", minval=2)
FilterOut=input(0.007, title="FilterOut", minval=0.0001)
HowBigBubbles0to1=input(0.02, title="HowBigBubbles0to1", minval=0.0001)

lr=linreg(close,10,0)
maxlr=highest(lr*(1+HowBigBubbles0to1),10)
minlr=lowest(lr*(1-HowBigBubbles0to1),10)


zld_h=linreg(high,len,0)
zld_l=linreg(low,len,0)
diff(a,b)=>(a-b)/((a+b)/2)
chop=diff(zld_h,zld_l)
t1=chop<FilterOut?maxlr:na
b1=chop<FilterOut?minlr:na

t2=chop>FilterOut?maxlr:na
b2=chop>FilterOut?minlr:na



p1=plot(t1,color=chop<FilterOut?#B45F06:na,style=line,linewidth=1,transp=100)
p1b=plot(b1,color=chop<FilterOut?#B45F06:na,style=line,linewidth=1,transp=100)

p2=plot(t2,color=chop>=FilterOut?white:na,style=line,linewidth=1,transp=100)
p2b=plot(b2,color=chop>=FilterOut?white:na,style=line,linewidth=1,transp=100)

fill(p1,p1b,color=#B45F06,transp=50)
fill(p2,p2b,color=white,transp=50)