Visual Order for an Indicator that plots a Vertical Line  [SOLVED]

Questions about MultiCharts and user contributed studies.
Linden
Posts: 2
Joined: 31 Aug 2012

Visual Order for an Indicator that plots a Vertical Line

Postby Linden » 03 Sep 2012

Hello,

On MC 8, 32 bit, Range bars, how do you program a vertical Line to be behind price bars? My rudimentary example below for GOLD open/close of pit times?

Problems:
1. If no bar forms during the 'zone' then no vertical line.
2. Sometimes vertical line displays then no vertical line then some more. Why?

Thanks in advance for any input.

Linden
Pict of vertical lines.bmp
(800.85 KiB) Downloaded 322 times
Example:

Input : colorB(darkgreen),colorE(red), size(1);
//Begin Time 5 minutes "Zone"
If Time_s > 080000 and Time_s < 082000 then begin
value1=tl_new_s(date,time_s,l,date,time_s,h);
tl_setcolor(value1,colorB);
tl_setstyle(value1,Tool_Dotted);
tl_setsize(value1,size);
tl_setextleft(value1,true);
tl_setextright(value1,true);
end;
//End Time 1/2 hour "Zone"
If Time_s > 130000 and Time_s < 133000 then begin
value1=tl_new_s(date,time_s,l,date,time_s,h);
tl_setcolor(value1,colorE);
tl_setstyle(value1,Tool_Dotted);
tl_setsize(value1,size);
tl_setextleft(value1,true);
tl_setextright(value1,true);
end;

User avatar
TJ
Posts: 7739
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1032 times
Been thanked: 2221 times

Re: Visual Order for an Indicator that plots a Vertical Line

Postby TJ » 03 Sep 2012

Hello,

On MC 8, 32 bit, Range bars, how do you program a vertical Line to be behind price bars? My rudimentary example below for GOLD open/close of pit times?

Problems:
1. If no bar forms during the 'zone' then no vertical line.
2. Sometimes vertical line displays then no vertical line then some more. Why?

Thanks in advance for any input.

Linden
Pict of vertical lines.bmp
Example:

Input : colorB(darkgreen),colorE(red), size(1);
//Begin Time 5 minutes "Zone"
If Time_s > 080000 and Time_s < 082000 then begin
value1=tl_new_s(date,time_s,l,date,time_s,h);
tl_setcolor(value1,colorB);
tl_setstyle(value1,Tool_Dotted);
tl_setsize(value1,size);
tl_setextleft(value1,true);
tl_setextright(value1,true);
end;
//End Time 1/2 hour "Zone"
If Time_s > 130000 and Time_s < 133000 then begin
value1=tl_new_s(date,time_s,l,date,time_s,h);
tl_setcolor(value1,colorE);
tl_setstyle(value1,Tool_Dotted);
tl_setsize(value1,size);
tl_setextleft(value1,true);
tl_setextright(value1,true);
end;
you can try the plot method instead.

viewtopic.php?f=1&t=10823

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Visual Order for an Indicator that plots a Vertical Line  [SOLVED]

Postby Henry MultiСharts » 05 Sep 2012

Hello Linden,

Trendlines cannot be plotted behind the data series. You need to use Plot per TS's suggestion to be able to control the visual order of the chart.


Return to “MultiCharts”