View Single Post
  #1226 (permalink)  
Old 07-06-2009, 07:34 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 722
Kalenzo is on a distinguished road
Quote:
Originally Posted by trader8021 View Post
Hi all traders,
I like to know if someone has a program to refresh the charts at a certain point of time. Like after a candle close. Maybe someone ells also have this request.
As you know that some ind repaint and I trade with one of them that helps me to make the right decision (only confirmation) in the right direction.
If any trader can help I will appreciate it

Tx in advance
8021
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;
}
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Reply With Quote