Noplot(n) not works when Plot(n)[m] m<-1 or m>1

Questions about MultiCharts and user contributed studies.
Chi-Yuan Shih
Posts: 14
Joined: 25 Aug 2007

Noplot(n) not works when Plot(n)[m] m<-1 or m>1

Postby Chi-Yuan Shih » 07 Jan 2009

In intraday charts, I need to plot at previous bar [plot1[length],Length>1] to observe the relation between present and previous bar. when ner bar occurs, I want to delete the old plot. Use noplot(n) but it doesnot work. I try to plot at future time, Plot1[-2], the Noplot(1) can not delete the old plot either.

I set Update on every ticks in the properties of the indicator.
I need to observe it on every tick.

Does anyone meet the same condition ?
Your solution to correct it is appreciated.

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

Postby Marina Pashkova » 20 Jan 2009

Hi Chi-Yuan Shih,

noplot(n) does not work on history. This function will work on the current bar only. In other words if you have the following code:

-------------------
plot1[1](high);
noplot(1);
--------------------

plot1[1](high); will draw plots on all bars (except the current bar) and noplot won’t affect it.

What you can do is use the following code:

---------------------
plot1[1](high);

plot2[2](plot1[2]);
setplotcolor(2, getplotbgcolor(1));
---------------------

Plot1 will create plots, plot2 will cover it with the background cover.

Regards.

Chi-Yuan Shih
Posts: 14
Joined: 25 Aug 2007

Postby Chi-Yuan Shih » 20 Jan 2009

:)
Thanks ! Marina.

I have tried your method.
**************************
plot2[2](plot1[2]);
setplotcolor(2, getplotbgcolor(1));
***************************

But getplotcolor(1) returns RED color. It should be BLACK.

Instead I use ***setplotcolor(2, getbackgroundcolor);***.
It works successfully to cover the previous plot with BALCK color, but it also draws the plot OVER original candlestick with black color.

Is that possible to redraw the candlestick of symblo AFTER the second Plot ?


Best Regards,
Jason

Gann_Man
Posts: 85
Joined: 01 Jul 2007
Location: Missouri
Has thanked: 7 times
Been thanked: 1 time

Postby Gann_Man » 20 Jan 2009

:)
Thanks ! Marina.

I have tried your method.
**************************
plot2[2](plot1[2]);
setplotcolor(2, getplotbgcolor(1));
***************************

But getplotcolor(1) returns RED color. It should be BLACK.

Instead I use ***setplotcolor(2, getbackgroundcolor);***.
It works successfully to cover the previous plot with BALCK color, but it also draws the plot OVER original candlestick with black color.

Is that possible to redraw the candlestick of symblo AFTER the second Plot ?


Best Regards,
Jason


Is your Plot1 DEFAULT color Red or Black?
It seems GetPlotColor only returns the DEFAULT color not the chart plot color.

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

Postby Marina Pashkova » 21 Jan 2009

:)
Thanks ! Marina.

I have tried your method.
**************************
plot2[2](plot1[2]);
setplotcolor(2, getplotbgcolor(1));
***************************

But getplotcolor(1) returns RED color. It should be BLACK.

Instead I use ***setplotcolor(2, getbackgroundcolor);***.
It works successfully to cover the previous plot with BALCK color, but it also draws the plot OVER original candlestick with black color.

Is that possible to redraw the candlestick of symblo AFTER the second Plot ?


Best Regards,
Jason


Hi Jason,

Try the code below:

Code: Select all

plot5[1](high);

plot6[2](plot5[2]);
setplotcolor(6, getplotbgcolor(5));


Return to “MultiCharts”