[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Code Problem



PureBytes Links

Trading Reference Links

This code is supposed to calculate the number of minutes in a tick bar and
put it on the screen. It works most of the time but not always. Your help
suggestions are appreciated.

Input: COLOR(Tool_White), PP(H),abv(1);

  Vars: Min1(0), Mins(0), newtext(0), Sbar(0);
  Min1 = TimeToMinutes(Time);
  Mins = Min1 - Min1[1];


newtext=text_new(date,time,PP,numtostr(Iff(Mins>0 and
time>Sess1StartTime,Mins,MinInDay-AV(mins)),0));
text_setstyle(newtext,2,abv);

	If GetBackGroundColor=Tool_White then Value4=Text_SetColor(newtext,
Tool_Red)
	Else Value4=Text_SetColor(newtext, Color); {changes numbers to red for
white charts.}

if false then plot1(C,"");

B.