Download MetaTrader 5

Refresh the chart window

To add comments, please log in or register
ma
239
ma  
Hi,

Every time I want to refresh my chart window, I click in a different time frame. And then, I chick again in time frame I was.

So I get two question:

1- there is any short key I could use to refresh my chart window?
2- there is any code I could use in MQL4 in order to refresh my chart window?

Thanks a lot,
brspMA.
Iggy
478
Iggy  

1. menu Charts/Refresh or rightclick Refresh

2. WindowRedraw()

Iggy
478
Iggy  

1. menu Charts/Refresh or rightclick Refresh

2. WindowRedraw()

Iggy
478
Iggy  

1. menu Charts/Refresh or rightclick Refresh

2. WindowRedraw()

Iggy
478
Iggy  
stupid page did not refresh fast enough. LOL
ma
239
ma  
Thanks a lot!

[]'s brspMA.
ma
239
ma  
Hi again,

I've trying to use this function WindowRedraw(), but with no success at all. What is going on? Even the Charts/Refresh or rightclick Refresh is not working.

I even create a simple script like this one:
int start()
  {
//----
   WindowRedraw();
//----
   return(0);
  }
So please if you know about something I am missing, I will appreciate your help,

brspMA
Slava
Moderator
6924
Slava  
See Period Converter script. PostMessage function call refreshes the chart.
ma
239
ma  
The function WindowRedraw(); is not working. My code looks like this:
 
int init()
{
   oldBarTime = Time[0];
}
and
int start()
  {
   if(oldBarTime != Time[0] && i==0){
      oldBarTime  = Time[0];
      WindowRedraw();
      PlaySound ("ok.wav");}
  }
with this code, on the beginning of each bar I get the Soud ok.wav. However, I don't get the Redraw of my chart. Why?

Thanks a lot,
Ray
2650
Ray  

What do you expect to see when you execute WindowRedraw() that you are not seeing?

ma
239
ma  
Hi phy, (by the way, I got this code that helps me to find a new bar from one of your replies here. Thanks)

What I am trying to do is simply redrawn my indicators . I want to see the same effect that I see when I change the time frame. Unfortunately, if I want to redraw my indicator, I have to change the time frame to MN (as instance), and after, go back to the time frame I was. I thought that I could use some code to keep my indicator refreshed/redrawn by each new bar.

Thanks a lot,
123
To add comments, please log in or register