hecate

hecate chop filter

hecate تم تحديثه   
Chop Filter to remove lateral trade under a threshold. Change the FilterOut parameter to filter all you want. Example of a model using it with a filtering of 0.003 (use to filter out to the level you prefer):
تعليق:
Updated script to lag less and be more clear
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
study(title="hecate chop filter", 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.005, title="FilterOut", minval=0.0001)
HowBigBubbles0to1=input(0.0001, title="HowBigBubbles0to1", minval=0.0001)

lr=linreg(linreg(close,15,0),15,0)
maxlr=highest(lr,50)
minlr=lowest(lr,50)


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*(1+HowBigBubbles0to1):close
b1=chop<FilterOut?minlr*(1-HowBigBubbles0to1):close

t2=chop>FilterOut?maxlr*(1+HowBigBubbles0to1):close
b2=chop>FilterOut?minlr*(1-HowBigBubbles0to1):close



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

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

fill(p1,p1b,color=red)
fill(p2,p2b,color=green)