Page 1 of 1

Vertical Time Plot indicator anyone?

Posted: Aug 28 2006
by jzolty
Any body know how to write an indicator to plot a vertical line at a set time of day. The set time adjustable in input: and the plot reoccuring every day...

thanks,
Jack

Posted: Aug 28 2006
by Alex Kramer
Please try this code:

Input : time_in_seconds(120000);
Input : color(red), size(2);

if time_s = time_in_seconds then begin
value1=tl_new_s(date,time_s,l,date,time_s,h);
tl_setcolor(value1,color);
tl_setsize(value1,size);
tl_setextleft(value1,true);
tl_setextright(value1,true);
end;

Thanks Alex,.. however indicator didn't plot

Posted: Aug 29 2006
by jzolty
Hi Alex, once again thank you for responding...however the indicator didn't show. ... ?? I'm not sure why... the code compiled ok..? just didn't appear on the chart. ?
hope you can help.

Posted: Sep 04 2006
by Stanley Miller
Dear Jack,

Here is the slightly modified code. You have to specify the time in HHMM format of the closing price of the current bar. For example 1600 if the Time of the bar is 4:00pm or 0930 if the Time of the bar is 9:30am. Please let me know how it works.

Code: Select all

Input : time_(1730);
Input : color(red), size(2);

if time = time_ then begin
value1=tl_new_s(date,time_s,l,date,time_s,h);
tl_setcolor(value1,color);
tl_setsize(value1,size);
tl_setextleft(value1,true);
tl_setextright(value1,true);
end;

Time plot

Posted: Sep 07 2006
by jzolty
Thank Stanley,
I tried the code however I get a horizontal line.....around the prices...
Basically what I am looking for is a vertical line to be plotted in a future time...
The plot will alert me when lunch trading is about to start or afternoon trading session is about to start..... ie. it gives me a heads up that the time is approaching.... I usually place these vertical lines in in the morning and then forget about them untill they show up at the predetermined time...

I hope to place the indicator once on the chart and it will plot everyday from then on at the predetermined time.
Sure hope you can help,
Jack

Re: Time plot

Posted: Sep 08 2006
by Chris
Thank Stanley,
I tried the code however I get a horizontal line.....around the prices...
Basically what I am looking for is a vertical line to be plotted in a future time...
The plot will alert me when lunch trading is about to start or afternoon trading session is about to start..... ie. it gives me a heads up that the time is approaching.... I usually place these vertical lines in in the morning and then forget about them untill they show up at the predetermined time...

I hope to place the indicator once on the chart and it will plot everyday from then on at the predetermined time.
Sure hope you can help,
Jack
Jack,

I used Stanley's code and I am getting a nice vertical line at my specified time i.e. 4:30 in my example.

Chris

P.S.: I am getting a horizontal line in some case, but this line changes in a vertical line within one tick.