I code a Trading strategy, and it quite heavy now. It's still ok on realtime trading.
However, The problem is when I review this strategy on Chart (with Old Data), I have to take action on the Chart like spaning, clicking, scrolling, zooming,... The Chart Windows is TOO LAGGING.
I tried change RequestTimedRefresh(), but chart is till updated when doing any chart actions.
Is there any way to Pause or Temporary Stop AFL Formula Refreshing/Executing when I need to Review Chart?
Quoting from a KB - When and how often AFL code is executed? :
- In a local database, which is not updated by a realtime plugin, the formula would get refreshed if we perform any actions, such as clicking, scrolling, zooming, changing parameters, choosing another symbol or interval, importing new data etc.
- In addition to the actions listed in (1), if we are running a plugin-based realtime feed, then the chart is refreshed based on “Intraday refresh interval” defined in Tools –> Preferences –> Intraday. If we enter 0 into this field, then it will result in chart being refreshed with every new tick (up to 10-times per sec).
- It is also possible to force certain refresh rate using dedicated RequestTimedRefresh() function in the AFL code: http://www.amibroker.com/f?RequestTimedRefresh
- It is also possible to manually refresh chart (or all chart and windows) using View->Refresh (or View->Refresh All ) menu.