/*[[ Name := TD_SEQUANTIAL_9_SETUP Author := Copyright © 2004, MetaQuotes Software Corp. Link := http://www.metaquotes.net/ Separate Window := No First Color := Blue First Draw Type := Symbol First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Symbol Second Symbol := 218 ]]*/ Variable : shift(0),NUM(0),textVar(" "),NUM1(0),textVar1(" "); SetLoopCount(0); // loop from first bar to current bar (with shift=0) For shift=1500 Downto 0 Begin IF CLOSE[SHIFT+1]< CLOSE[SHIFT+5] THEN NUM=NUM+1 ELSE NUM=0; if NUM> 0 and NUM<10 then { textVar = NUM; if NUM=9 then SetText(time[shift+1],low[shift+1],textVar,green)else SetText(time[shift+1],low[shift+1],textVar,red); }; SetIndexValue(shift+1, 0); IF CLOSE[SHIFT+1]> CLOSE[SHIFT+5] THEN NUM1=NUM1+1 ELSE NUM1=0; if NUM1> 0 and NUM1<10 then { textVar1 = NUM1; if NUM1=9 then SetText(time[shift+1],high[shift+1],textVar1,Brown)else SetText(time[shift+1],high[shift+1],textVar1,blue); }; SetIndexValue2(shift+1, 0); End;