Is it possible to plot an indicator for certain time?

Questions about MultiCharts and user contributed studies.
Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Is it possible to plot an indicator for certain time?

Postby Spaceant » 28 Jan 2011

Hi,

I have an indcator for the afternoon trading session only plotting on the #subchart #1. As the indicator is useless on the morning session, I would like to disable the plot on the mornig session.

Is there any way to suppress the plot on the morning, i.e. the indicator just plots on and after cerin time say 1230?

Thanks in advance!

Sa

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Is it possible to plot an indicator for certain time?

Postby Dave Masalov » 28 Jan 2011

Dear Spaceant,

Yes, it is possible. Here is an example of the code:

if time > 1230 then plot1(close);

Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Re: Is it possible to plot an indicator for certain time?

Postby Spaceant » 30 Jan 2011

Dear Spaceant,

Yes, it is possible. Here is an example of the code:

if time > 1230 then plot1(close);

It doesn't plot suppress the plot when time < 1230. Why is that?

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Is it possible to plot an indicator for certain time?

Postby TJ » 30 Jan 2011

Dear Spaceant,

Yes, it is possible. Here is an example of the code:

if time > 1230 then plot1(close);

It doesn't plot suppress the plot when time < 1230. Why is that?
what is your plot style? line? point? histogram?
are you plotting on main chart? or subchart?
can you post a sample?

janus
Posts: 838
Joined: 25 May 2009
Has thanked: 64 times
Been thanked: 105 times

Re: Is it possible to plot an indicator for certain time?

Postby janus » 30 Jan 2011

It doesn't plot suppress the plot when time < 1230. Why is that?
Perhaps this is the issue. If you are using a line style then you can't stop the plot completely because it will draw a line from the last plot to the next one. To avoid this you have to use say a point style. I consider it a major flaw in any charting package not being able to draw line style plots with gaps.

Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Re: Is it possible to plot an indicator for certain time?

Postby Spaceant » 30 Jan 2011

It doesn't plot suppress the plot when time < 1230. Why is that?
Perhaps this is the issue. If you are using a line style then you can't stop the plot completely because it will draw a line from the last plot to the next one. To avoid this you have to use say a point style. I consider it a major flaw in any charting package not being able to draw line style plots with gaps.
Thanks, Janus

I got it done with without using a line style.


Return to “MultiCharts”