All analysis in AmiBroker including charting, Analysis window or commentaries is based on underlying AFL code, which is being executed by the program to produce the required output. Therefore – any changes we see in the charts or analysis results (for example – chart updated with new ticks) mean that the program has received some input, then based on this information has recalculated the formula and presented the updated results.<\/p>
These refreshes \/ formula recalculations depend on several factors:<\/p>
It is worth noting that chart formulas are refreshed only when they are placed on the active chart sheets. Non-active sheets just ‘don’t exist’, they are only created when you click on a bottom tab (sheet tab) to make them visible and destroyed immediately when other sheet becomes active. This ensures that precious CPU resources are not wasted on invisible chart sheets.<\/p>
Additionally – by default charts in minimized chart windows or when multiple MDI windows are open and one is maximized, the windows in background that are completely obscured by others and\/or minimized windows are not redrawn\/refreshed during normal RT refresh. We can however call RequestTimedRefresh<\/strong> function with onlyvisible<\/strong> argument set to False<\/strong> and that will force regular refreshes in such windows as well.<\/p>RequestTimedRefresh<\/span>( <\/span>1 <\/span>, <\/span>False <\/span>); <\/span>\/\/ force refresh for minimized MDI window or obscured MDI windo<\/code>
With regards to Analysis<\/strong> window – in general the formula is executed when we run e.g. Scan, Exploration, Backtest etc. Analysis window executes the formulas in multiple threads running in parallel (this tutorial explains multi-threading aspects:
http:\/\/www.amibroker.com\/guide\/h_multithreading.html<\/a>).<\/p>
http:\/\/www.amibroker.com\/kb\/2014\/10\/03\/how-to-setup-perodic-scans\/<\/a><\/p>
during AFL Syntax Check<\/strong> that happens when applying the chart, or sending the code to Analysis window, or updating existing formula
when it is about to display Parameters<\/strong> window for the first time for given chart or during Parameters’ “Reset All” operation
at the beginning of Optimization when it reads Optimize() statements to configure the optimization process and\/or smart optimization engines
at the beginning of each In-sample walk-forward step again to setup optimization parameters<\/ol>Bottom line: we should never assume that certain formula will only be executed e.g. N-times during certain time-frame, because all really depends on the above factors, our actions and changing input.<\/p>","protected":false},"excerpt":{"rendered":"
All analysis in AmiBroker including charting, Analysis window or commentaries is based on underlying AFL code, which is being executed by the program to produce the required output. Therefore – any changes we see in the charts or analysis results (for example – chart updated with new ticks) mean that the program has received some […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1082"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=1082"}],"version-history":[{"count":2,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1082\/revisions"}],"predecessor-version":[{"id":1085,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1082\/revisions\/1085"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=1082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=1082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=1082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}