study(shorttitle="AfterHours vs IntraDay", title="AfterHours vs IntraDayD", overlay=true) // //Works only on DAILY CHARTS //Blue line is intraday contribution //Black line is overnight gap length = input(20, minval=1) src = input(close, title="Source") sro = input(open, title="Source") src1 = src[1] intrad=src-sro co=cum(intrad) AH=sro-src1 oc1=cum(AH) summ=co+oc1 offst=src[0]-summ[0] plot(co+offst, color=blue) plot(oc1+offst, color=black) //plot(co+oc1+offst, color=red)