# Should I FOMO??

608 views
608
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 !!

```//@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)

```
man can u teach a math noob how the fuq thisd works looks reallyi nteresting