Places (charts, editors) to Write/Execute AFL From. .

[ENV]: Amibroker 6.20.1 on Windows 10. Also using Visual Studio C++ 2017

[QUERY SUMMARY]:
I wish to know places i.e. AB editors, AB windows where I can 'place' generic-utility-oriented AFL code. For example, AFL could be attached to Chart. Can be used in Automatic Analysis. However, if I wish to interface candle data to outside Amibroker, say to export data to CSV files, or to write in-memory etc, which is the place where I can 'place' the AFL code?

[QUERY IN DETAIL]:
There are two parts of my work. One is find the place where I can place the AFL code for Amibroker to execute and second part is design of AFL, use of functions to export candle data. I have kept second part away for now.

The way 'C' program will execute on its own, is there any way in Amibroker, for me to execute such an AFL, which will iterate through symbols and will export all backfill candles and subsequently loop to export all next candle data (to whatever external interface).

[MY SEARCH in FORUM]:
From forum search, I only see Chart and Automatic Analysis windows as places where I can place the AFL. However, I could not confirm if that will be place because there will not be any other place to put such a AFL code. I felt Chart may not be good place, as it may refer to a Symbol and this work spans across all of Symbols.

I also found that OLE can be used to control AB externally. Will that be best way, as I have to only negotiate with candle data, but not charts for now.

Any clues will be quite helpful.

Thanks a lot for your time

Kedar

AFL formulas can be run from old Analysis window, new Analysis window, chart, commentary, batch.

As for "generic utility" AFL file you can place it inside "Include" subfolder (under "Formulas" folder) and use #include/#include_once, see http://www.amibroker.com/guide/afl/_include.html from whatever formula

Thanks a lot Tomasz. Quite useful inputs. Will study all these, especially last two - Commentary window and Batch processing.

Thanks again, helps in taking ahead my work.

Regards

Kedar