How to make the MT4 auto refresh itself?

 
Some of the indicators repaint and always need to refresh to get the result. How to make the MT4 auto refresh itself?
 

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

 
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 

 

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

 
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 ?
 
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.
 
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 ?

 

Can anyone code a simple EA?

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

Thanks.

 
edfiuza:

Can anyone code a simple EA?

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

Thanks.



Why?
 
tonny:
Why?

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

I need to keep the offline chart updated.

 
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.