This indicator for tick charts displays the average time between bars for the last x bars (default is 5).
//jh_time_2_min
input: numbars(5);
vars: lasttime(0), firsttime(0), timediff(0), timetext(0);
once timetext = Text_New(0,0, 0, NumToStr(timediff, 1));
timediff = (TimeToMinutes(Time[1]) - TimeToMinutes(Time[numbars + 1]))/numbars;Text_SetString(timetext, NumToStr(timediff, 1)+ " min");
value1 = Text_Float(timetext, 0, 2);
Thursday, July 17, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment