How to make MT4 auto refresh - page 6

 
Mladen Rakic:

Yes, it is normal

When you post a bars refresh message to a chart it writes that in a log file. Why is it writing that (which is no error at all) and it is not logging errors - we should ask the mq

dear Mladen,

I attach this indicator to chart on VPS that VPS operating system is windows server 2016,

and this error appeared:

any solution?

 
Mohammad Hasan Mosaddeqi: I attach this indicator to chart on VPS that VPS operating system is windows server 2016,
  1. What ever DLL your code is calling does not exist on your VPS.
  2. You can't run DLLs on Metaquote's VPS. Are you allowed to on your VPS?
 
William Roeder:
  1. What ever DLL your code is calling does not exist on your VPS.
  2. You can't run DLLs on Metaquote's VPS. Are you allowed to on your VPS?

1.These DLLs:

2.How can run DLL on VPS?

 

I fixed the same problem in FAMA indicator by changing a line in strat() function

after variables were declared there was a loop for calculation --> 

int    counted_bars=IndicatorCounted();
for(cb=Bars-counted_bars-Range-1;cb>=0;cb--)

I just changed it into -->

 for(cb=Bars-Range-1;cb>=0;cb--)

So i guess the problem in general with these indicators is just the index of calculation.

 
  1. See How to do your lookbacks correctly #9 - #14 & #19.

  2. You should stop using the old event handlers and IndicatorCounted() and start using new event handlers.
              Event Handling Functions - MQL4 Reference
              How to do your lookbacks correctly - MQL4 programming forum #9-14 & #19 2016.05.11

 
MANSTIR:

do u have indicator for MT4 auto refresh

please i need it like crazy...

I have the same crazy one. 

I have open offline chart, when change data i need to manual refresh, so i need it automatic refresh.

Do you have any solving this issue?

The following code not work

int OnInit()
  {
   EventSetTimer(60); 
   return(INIT_SUCCEEDED);
  }
void OnDeinit(const int reason)
  {
   ObjectsDeleteAll(ChartID(),objID);
   EventKillTimer(); 
  }
void OnTimer()
  {
   RefreshRates();
   ChartRedraw();
   WindowRedraw();
  }
 
Eldiablo54:

Hi guys,

Found this indi. It works nice to refresh all indicators at the close of every bar.

Mladen can I ask you please to modify this so that it refreshes every tick and not at every end of bar please.symphonie_autorefresh.mq4

I have solved refresh offline chart by using ChartSetSymbolPeriod() command, it will be more simple.

 
I used the <deleted> indicator and this does almost everything I want. I have an indicatir which I want to refresh on every new candle of the 1 hour chart. So when I place my indicator with this indicator on the 1 hour chart, everything works fine. Now I want my indicator on the H4, but then the  <deleted> indicator only works on a new H4 candle and not on a H1 new candle. Is it possible to make it so that I can place it on the H4 (or any other TF) and it will react on H1 new candle? 
 
smika #:
I used the <deleted> indicator and this does almost everything I want.

I don't know what indicator you are referring to.

If you want to discuss a non-standard indicator you must attach the source code. If it is from codebase, include a link.

 

SOrry, I didn' realize that th name was deleted. I was reffering to: https://c.mql5.com/forextsd/forum/138/symphonie_autorefresh.mq4

I tried already:

 if(Minute()==0 && Seconds()==0)


But then It will happens a lot of times within a second and my chart will ends in the W1 timeframe (sometimes, when the second is over) and not the timeframe which I started (H4). So maybe it is possible to force it to do it on if(Minute()==0 && Seconds()==0), but then only once?

Reason: