/*[[ Name := TDeMark SEQUANTIAL 9 Extended Author := Copyright © 2004, FostarFX v2.0 Link := mail: fostar_fx@yahoo.com 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 ]]*/ Inputs: FontSize_Small_count(8), FontSize_Big_Final(12), PipsOffset(4), BarCount(200); Variable : shift(0), num(0), textVar(" "), num1(0), textVar1(" "), offset(0); var: name(""), name_text("TrendCountName_Fostar_"); SetLoopCount(0); for shift = 200 downto 0 Begin name = name_text + "1_" + NumberToStr(shift, 0); DelObject(name, 0, 0, 0, 0); name = name_text + "2_" + NumberToStr(shift, 0); DelObject(name, 0, 0, 0, 0); end; offset = PipsOffset * point; For shift=200 Downto 0 Begin name = name_text + "1_" + NumberToStr(shift, 0); if close[shift+1] < close[shift+5] then num = num + 1 else num = 0; if num > 0 and num < 10 then { textVar = num; MoveObject(name, OBJ_TEXT, time[shift+1], low[shift+1], time[shift+1], low[shift+1], red, 1, STYLE_SOLID); if num = 9 then{ SetObjectText(name, textVar, "Arial Black", 12, Cyan); }else { SetObjectText(name, textVar, "Arial Black", 8, red); } }; if close[shift + 1]> close[shift + 5] then num1 = num1 + 1 else num1 = 0; name = name_text + "2_" + NumberToStr(shift, 0); if num1 > 0 and num1 < 10 then{ textVar1 = NUM1; MoveObject(name, OBJ_TEXT, time[shift+1], high[shift+1] + offset, time[shift+1], high[shift+1] + offset, red, 1, STYLE_SOLID); if num1 = 9 then{ SetObjectText(name, textVar1, "Arial Black", 12, white); }else{ SetObjectText(name, textVar1, "Arial Black", 8, Lime); } }; SetIndexValue(shift, 0); End;