/*[[ Name := 2 Period ROC Pivot on Price Author := Aslam Link := saslam@bigfoot.com Note:= Use this in Daily Chart to indicate the up/down cycles (more than 70% accuracy) Note:= When the new daily candle opens, If the line goes above yesterdays high then today is a sell day and if it goes below yesterdays low it is a buy day. If it is below (for bullish)yestedays close or above (for bearish)yestedays close, it is a continuation of yesterday Separate Window := No First Color := Blue First Draw Type := Line First Symbol := 217 Use Second Data := Yes Second Color := Pink Second Draw Type := Line Second Symbol := 218 ]]*/ var: shift(0),loopbegin(0),ROC(0),Pivot(0),Pivot2(0); SetLoopCount(0); For shift = 200 Downto 0 Begin { Pivot=((Close[shift+1]-Close[shift+3])+Close[shift+2]); SetIndexValue(shift, Pivot); Pivot2=((Close[shift+0]-Close[shift+2])+Close[shift+1]); SetIndexValue2(shift, Pivot2); } End;