Download MetaTrader 5

How to make the MT4 auto refresh itself?

To add comments, please log in or register
fxewen
97
fxewen  
Some of the indicators repaint and always need to refresh to get the result. How to make the MT4 auto refresh itself?
Nathan
1438
Nathan  

Tan Yee Wen,

Indicators update based on ticks (last I checked). If a new tick is made on the currency pair, the indicator attached to this currency pair updates.

Your question, "How to make the MT4 auto refresh itself?"

I believe "refresh" for you means the same thing as when a new tick is created. A new tick updates indicator drawings.

I believe a new tick being created starts the indicators program. If a new tick is not created, the start() function isn't executed. If the start() function isn't executed the indicator won't update.

As far as I am aware of, there isn't another method to call the start() function besides tick updates.

 

Thank you

fxewen
97
fxewen  
WhooDoo22:

Tan Yee Wen,

Indicators update based on ticks (last I checked). If a new tick is made on the currency pair, the indicator attached to this currency pair updates.

Your question, "How to make the MT4 auto refresh itself?"

I believe "refresh" for you means the same thing as when a new tick is created. A new tick updates indicator drawings.

I believe a new tick being created starts the indicators program. If a new tick is not created, the start() function isn't executed. If the start() function isn't executed the indicator won't update.

As far as I am aware of, there isn't another method to call the start() function besides tick updates.

 

Thank you



Hi WhooDoo22,

I saw a RefreshRates ( ), at https://docs.mql4.com/windows/RefreshRates, that related to Sleep( ), I studing.

Thanks 

Nathan
1438
Nathan  

Tan Yee Wen,

If your reading, I found this link (https://book.mql4.com/variables/predefined) useful (its a page of the book). Sometimes documentation can be a bit dull ;) Hahaha!

Also, I included a section of this page I found of value. Maybe you will as well.

RefreshRates()

The question becomes, what condition would your EA use to execute the RefreshRates() function?


Thank you

Simon Gniadkowski
Moderator
18004
Simon Gniadkowski  
FXEWEN:

Hi WhooDoo22,

I saw a RefreshRates ( ), at https://docs.mql4.com/windows/RefreshRates, that related to Sleep( ), I studing.

Why do you need to refresh the values held in the predefined variables ?  if you have no tick how is RefreshRates() going to be called ?
whroeder1
14785
whroeder1  
FXEWEN:
Some of the indicators repaint and always need to refresh to get the result. How to make the MT4 auto refresh itself?
  1. Indicators can NOT sleep. WhooDoo22 you were already told that in another thread.
  2. You do not need to refresh your chart. You need to FIX your indicator. It is broken.
jayadi
3
jayadi  
RaptorUK:
Why do you need to refresh the values held in the predefined variables ?  if you have no tick how is RefreshRates() going to be called ?

eduardo fiuza
228
eduardo fiuza  

Can anyone code a simple EA?

I would like to refresh the chart every "n" seconds.

Thanks.

Tonny Obare
1025
Tonny Obare  
edfiuza:

Can anyone code a simple EA?

I would like to refresh the chart every "n" seconds.

Thanks.



Why?
eduardo fiuza
228
eduardo fiuza  
tonny:
Why?

I use an EA attached to offline chart using RangeBars and some indicators.

I need to keep the offline chart updated.

Simon Gniadkowski
Moderator
18004
Simon Gniadkowski  
edfiuza:

I use an EA attached to offline chart using RangeBars and some indicators.

I need to keep the offline chart updated.

In that case your post is off topic for this thread . . . please search the forum or use Google to search this forum for tick generators/creators.
12
To add comments, please log in or register