ADE (2)

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
miltonc4
Posts: 150
Joined: 14 Apr 2006
Has thanked: 1 time
Been thanked: 3 times

ADE (2)

Postby miltonc4 » 16 Jun 2008

Hi All
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;

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 20 Jun 2008

Hi Milton,

You can try replacing 'clearprintlog' by 'cleardebug'.

However, on our end, we couldn't compile the code because we don't have the MapNN functions.

miltonc4
Posts: 150
Joined: 14 Apr 2006
Has thanked: 1 time
Been thanked: 3 times

Postby miltonc4 » 20 Jun 2008

Hi marina
Thanks ever so much,it compiled OK
Milton

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 23 Jun 2008

Hi Milton,

Glad it worked for you.

Cheers.


Return to “User Contributed Studies and Indicator Library”