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.
I saw a RefreshRates ( ), at https://docs.mql4.com/windows/RefreshRates, that related to Sleep( ), I studing.
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.
The question becomes, what condition would your EA use to execute the RefreshRates() function?
Can anyone code a simple EA?
I would like to refresh the chart every "n" seconds.
I use an EA attached to offline chart using RangeBars and some indicators.
I need to keep the offline chart updated.