This was my poor attempt to get it which was... nothing
Any help?
Code: Select all
[ProcessMouseEvents = true];
Inputs:
TextFont ("Microsoft Sans Serif2"),
TextSize (8),
TextColor (white);
Variables:
DailyHi (-999999),
DailyLo (+999999),
CurrentSess (0),
DailyCl (0),
prevDayHi (0),
prevDayLo (0),
prevDayCl (0),
txtBox (0);
If currentbar = 1 then begin
if MouseClickCtrlPressed then begin
txtBox = text_new_s(date,time_s, high, " ");
text_setfontname(txtBox, TextFont);
text_setcolor(txtBox, TextColor);
text_setsize(txtBox, TextSize);
Text_SetStyle(txtBox, 1, 2);
text_lock(txtBox, true);
end;
end;
CurrentSess = CurrentSession( 0 ) ;
// new session
if CurrentSess <> CurrentSess[1] then begin
prevDayCl = DailyCl;
if DailyHi <> -999999 then
prevDayHi = DailyHi;
if DailyLo <> +999999 then
prevDayLo = DailyLo;
DailyHi = -999999;
DailyLo = +999999;
end;
// high, low and close set
DailyCl = Close;
if High > DailyHi then
DailyHi = High;
if Low < DailyLo then
DailyLo = Low;
// text box string
text_setstring(txtBox, spaces(1) + "yDayHi " + spaces(4) + numtostr(prevdayhi, 2) + spaces(1) +
newline + spaces(1) +
"yDayLo " + spaces(4) + numtostr(prevDaylo, 2) + spaces(1) +
newline + spaces(1) +
"yDayCl " + spaces(5) + numtostr(prevdaycl, 2) + spaces(1));
// text location
if BarStatus(1) = 2 then begin
Text_SetLocation_s(txtBox, date, time_s, high);
end;
// plot lines
if prevDayHi <> 0 then
plot1(prevDayHi);
if prevDayLo <> 0 then
plot2(prevDayLo);
if prevDayCl <> 0 then
plot3(prevDayCl);