
07-07-2009, 06:37 AM
|
|
Junior Member
|
|
Join Date: Nov 2005
Posts: 7
|
|
Quote:
Originally Posted by Kalenzo
Hello!
This depends from your indicator, if you wish to redraw graph objects like arrows, lines, boxes and so on then you need to use WindowRedraw() function. If your indicator is using buffers to draw something on the chart and it refresh after eg. attaching it again on the chart, then you need to recode it by removing IndicatorCounted() function and replacing it with eg 100 bars. In this way indicator will repaint last 100 bars when each new tick will come, but then you can add condition to do this only when new bar is coming eg:
1) define global variable B
2) set by default B = 0;
3) condition like this:
if(Bars>B)
{
//redraw here
//set B parameter
B = Bars;
}
|
Hi,
thx for the advice.
I will contact you if i strugle with the coding.
Greatings
8021
|