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.
Noplot(n) not works when Plot(n)[m] m<-1 or m>1
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
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.
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.
-
- Posts: 14
- Joined: 25 Aug 2007
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
-
- Posts: 85
- Joined: 01 Jul 2007
- Location: Missouri
- Has thanked: 7 times
- Been thanked: 2 times
Is your Plot1 DEFAULT color Red or Black?
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
It seems GetPlotColor only returns the DEFAULT color not the chart plot color.
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Hi Jason,
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
Try the code below:
Code: Select all
plot5[1](high);
plot6[2](plot5[2]);
setplotcolor(6, getplotbgcolor(5));