First of all. Are you sure that you used 0.1
(dot) not 0,1
(comma)? Maybe that's the problem...
This code uses RequestTimedRefresh()
. I quote from: AFL Function Reference - REQUESTTIMEDREFRESH
Starting from version 5.30.3 RequestTimedRefresh supports sub-second (down to 0.1 sec) resolution, when enabled via registry setting (HKCU/Software/TJP/Broker/Settings/EnableHiresRTR, DWORD value = 1 )
You might need to check your registry settings. You can use REGEDIT tool for that (Windows Start-->Run / type in: regedit ) Before changing anything, you should close AmiBroker. Be very careful when editing the registry ...
Here is an example showing how to edit registry to increase the maximum number of bars:
Of course it is not true. As you can see, using RequestTimedRefresh()
you can refresh your code even 10 times per second. But don't use it if it's not necessary! Besides read here:
Another example:
AFL: RequestMouseMoveRefresh()
- request formula execution / refresh when mouse is moved INSIDE given chart pane (so it only triggers for ONE window under the cursor)
This provides less resource consuming way to handle chart graphics that depends on mouse hovering over chart pane than using RequestTimedRefresh as it only triggers one window currently under the cursor and only does not trigger refreshes when mouse does not move. Mouse move refreshes come "as fast as possible". If your code is fast you can get butter smooth animation (even 50fps)