Wednesday, January 16, 2008

Tick Countdown EasyLanguage Code: Important Setting



//be sure you use "Tick Count" for volume//works for both tick and share charts
input: AlertTicks(10), HOffset(3), AlertText("tick"),AlertColor(magenta), NonAlertColor(magenta);
vars: txt(-1),TicksLeft(0),color(0);
if BarType = 0 thenbegin //initiate the text variable if BarNumber = 1 then txt = text_new(date,time,close," "); TicksLeft = BarInterval - ticks; {if OneAlert(TicksLeft <= AlertTicks) then alert(NumToStr(TicksLeft,0)+"-"+AlertText+" alert");} //text color changes with alert if TicksLeft > AlertTicks then color = NonAlertColor else color = AlertColor;
//reset at each tick text_SetLocation(txt,date,CalcTime(time,HOffset),close); text_SetString(txt,NumToStr(TicksLeft,0)+" " + AlertText); text_SetColor(txt,color);end;

No comments: