@wtf_dude hi, for my learning, may request you to explain what does this scan do? what type of stocks can we get from this scan? Can i change this to weekly timeframe, if so, what input length is recommended... thank you very muchGave this a little bit more flexibility to be able to switch it to other numbers, securities, etc. Also, the multiplier was supposed to 100, not 10 like posted here. For some reason the indices are cutting off at the end of 2019, so I just switched it to spy for now.
declare lower; input Correlation_with_Security = "SPY"; input length = 200; input Period = AggregationPeriod.DAY; input averagetype = AverageType.Simple; def price = close; def RSD = close/(close(correlation_with_security)); def RSDavg = MovingAverage(averagetype, RSD, length); plot RSM = (( RSD / RSDavg) - 1 ) * 100; plot zeroline = 0; zeroline.SetDefaultColor(GetColor(2));