Please advise - How do I run an automatic scan in Amibroker everyday using a specific AFL on a specific DATA folder at a specific time everyday, using today’s dates, and email the Buy/Sell results to a specific email address? I have seen ‘AlertOn’ function but I am not sure how it will fulfil the same function.
Use Batch window:
The Batch window introduced in version 6.20 (first time actually in 6.17.0 BETA) allows the user to automate mundane repetitive tasks by providing batch processing.
Now the user can easily define and automatically run sequences of Analysis operations such as scan, exploration, backtest and optimization and file export. Previously such automation was available only for programmers by means of OLE automation. Now it is available to everyone via easy-to-use interface.
https://www.amibroker.com/guide/h_batch.html
http://forum.amibroker.com/search?q=batch
One significant difference between the Batch window and the use of the OLE interface via script is stated in the “Important Notes” in the above-linked documentation.
Scheduled tasks are only run when AmIbroker is running. AmiBroker does not create background / hidden processes. Windows already have too many wasteful processes running all the time. If you need 24/7 operation, just do not close AmiBroker. If you close AmiBroker, it won’t run any tasks until you start AmiBroker again, then all missed tasks will be run once and afterward they will be run on a normal schedule (if repeat option is used).
If you want/need to close the application you have to use the OLE interface invoking your scripts via the Windows task scheduler.
A search here on the forum for both the Batch window and the OLE interface scripts usage will probably give you a better idea of what is more appropriate for your situation.
Thanks I'll check up both methods