hecate

Should I FOMO??

Should I FOMO?? (number of revisited candles in a timeframe)
=============================================================
idea: hecate
I fomo way too much so i have created this little indicator to show me how many times (PERCENT) a candle is revisited in a period P
with the idea that i should not panic and maybe just wait patiently for a better price.
Just set the period P to your desired timeframe, days hours, whatever and WAIT patiently because many times it does come back :D and many times !!

نص برمجي مفتوح المصدر

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

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

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

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//@version=2

//Should I Panic?? (number of revisited candles in a timeframe)
//=============================================================
//idea: hecate
//I fomo way too much so i have created this little indicator to show me how many times (PERCENT) a candle is revisited in a period P
//with the idea that i should not panic and maybe just wait patiently for a better price.
//Just set the period P to your desired timeframe, days hours, whatever and WAIT patiently because many times it does come back :D and many times !!

study("Should I FOMO??",overlay=true)

c=input(close)
barsback=input(title="Barsback Period (def is num of hours in a day)",type=integer,defval=168,minval=10,maxval=600)
smoothing=input(title="Smoothing",defval=2,minval=2,maxval=50)

zs(a,b)=>(a-linreg(a,b,0))/stdev(a,b)

revisit(a,b,p)=>
    tot=0
    for i = 0 to p-1
        if(cross(a,b[i]))
            tot:=tot+1
    return = tot

r=linreg(100*revisit(c,c,barsback)/barsback,smoothing,0)
md=linreg(r,600,0)
rv=(r>=md*1.5) ? 3  : (r>=md*0.5) and (r<md*1.5) ? 2 : (r<md*0.5) ? 1 : 1

col1=red
col2=yellow
col3=green

plot(close,style=line,color=rv==1?col1:rv==3?col3:rv==2?col2:na,linewidth=2,transp=0)