Following on from the earlier ADE post
I have just found this Code,although suupsedely plots horizontal lines,has inputs and variables I might need to get me started,but it does not verify……stops verifying at:-
Line 16 ClearPrintLog;
Any thoughts
Milton
PS if this code can be verified,how can I use it to plot the 10 min MACDBB line on the 2 min Chart
Sorry I just dont know where to start(Sender Chart/Receiver Chart ? or other)
Code: Select all
{https://www.TS.com/Discussions/Topic.aspx?Result=1&Topic_ID=33397&Page=3}
Inputs:
level1(595.70),
level2(596.30);
Variables:
Lines(MapNN.New),
IntrabarPersist StartBar(0),
IntrabarPersist UpdateBar(0),
rc(0),
plot_level(0),
line_ID(0);
if CurrentBar = 1 then
ClearPrintLog;
if LastBarOnChart then begin
if StartBar = 0 or StartBar = CurrentBar then begin
line_ID = TL_New(Date[1], Time[1], level1, Date, Time, level1);
TL_SetExtRight(line_ID, true);
rc = MapNN.Put(Lines, line_ID, level1);
Line_ID = TL_New(Date[1], Time[1], level2, Date, Time, level2);
TL_SetExtRight(line_ID, true);
rc = MapNN.Put(Lines, line_ID, level2);
StartBar = CurrentBar;
end
else if UpdateBar < CurrentBar then begin
rc = MapNN.Rewind(Lines);
while MapNN.Next(Lines,line_id,plot_level) begin
rc = TL_SetBegin(line_ID, Date[1], Time[1], plot_level);
Print(CurrentBar:0:0, ": rc from set begin = ", rc);
rc = TL_SetEnd(Line_ID, Date, Time, plot_level);
Print(CurrentBar:0:0, ": rc from set end = ", rc);
end;
UpdateBar = CurrentBar;
end;
end;