Code: Select all
// 25-12-2012
// Multicharts forum thread : http://www.multicharts.com/discussion/viewtopic.php?f=5&t=11658
input:
RightTimeOffSet (5),
LeftExtension (false),
RightExtension (true),
LastPriceColor (green),
LastPriceSize (0);
variables:
intrabarpersist lastPrice (0),
minute (0),
lastPriceRightTL (-1),
lastPrideLeftTL (-1);
minute = TimeToMinutes(rightTimeOffSet)*60;
minute = SecondsToTime_s(minute);
lastPrice = close;
tl_delete(lastPriceRightTL);
tl_delete(lastPrideLeftTL);
if RightExtension = true then begin
lastPriceRightTL= tl_new_s(date, time_s + minute, lastPrice , date + 1, time_s, lastPrice );
tl_setcolor(lastPriceRightTL, lastPriceColor);
tl_setsize(lastPriceRightTL, lastPriceSize);
tl_setextright(lastPriceRightTL, true);
end
else begin
lastPriceRightTL= tl_new_s(date, time_s + minute, lastPrice , date, time_s, lastPrice );
tl_setcolor(lastPriceRightTL, lastPriceColor);
tl_setsize(lastPriceRightTL, lastPriceSize);
end;
if LeftExtension = true then begin
lastPrideLeftTL= tl_new_s(date[1], time_s[1], lastPrice , date, time_s, lastPrice );
tl_setcolor(lastPrideLeftTL, lastPriceColor);
tl_setsize(lastPrideLeftTL, lastPriceSize);
tl_setextleft(lastPrideLeftTL, true);
end;