It does not matter if you run Scan, Exploration, Backtest, via Foreign or not or what ever. Data are accessed the same way regardless
Also Foreign works the same regardless if it is EOD or Intraday.
If you are running with data plugin that does backfill:
You need to remember that by default backfills in our plugins are asynchronous, the plugin requests data from remote data source and does NOT wait with analysis, it goes thru making more requests. Eventually data vendor/source responds with data and they arrive but they will be seen only (obviously) after data source responds.
For reason explained in (1), you might need/want to wait for data source to complete backfills (at least initial after starting AmiBroker)
In order to perform backfills synchronously (i.e. WAITING for external data source) you have to run Analysis at least once since AmiBroker with "Wait for backfill" option turned on
"Wait for backfill" must be supported by the data plugin. If it doesn't it won't work (won't wait).
First of all, thank you for the comprehensive help. Helped me understand the process better. It wasn't entirely clear to me whether the data updated in the memory by the plugin was already being used when accessing via SetForeign or only the data existing in the internal database.
I use the plugin from Taipan RT 64 Bit, company Lenz + Partner, in Germany. They describe themselves as an official partner of Amibroker on their website.
The “Wait for Backfill” option is activated for me.
The plugin hangs after I run Scan several times. But this may be because I call Buy = 1 in the scan for the entire test period. Buy = Status("LastBarInRange") or similar might work better.
If I understood it correctly, even a single scan before the start of trading would probably be enough.
But I can't test it until Monday.
Unfortunatelly, Taipan wrote the plugin by themselves. They did not ask questions about backfill, or anything, so I doubt if it is implemented at all.
If wait for backfill was implemented in the plugin, you would see it waiting before proceeding to next symbol as typically request->response takes something like a second or so, so it is clearly visible that it steps.
If it goes fast, it means that plugin is not waiting.
The formula that you use for scan doesn't matter. It is completely irrelevant if you use Buy = 1 or Buy = Status("LastBarInRange").
Normally (i.e. our own plugins) request backfill and subscribe to given symbol therefore after initial backfill symbols are kept current in real time and don't need backfill again. That is however subject to subscription limits. For example IQFeed has subscriptions with 500 or even 1300 real time symbols.
I know from a trader friend that the developer of the plugin hasn't been employed there for years. Version 1.1.1 also suggests a beta version. This trader friend introduced me to Amibroker about 3 years ago. I am still grateful to him for that today and pray for him every evening.
I believe that Wait for Backfill is implemented. If you perform a scan with Buy = 1 on an empty database, for example on the HDAX or the N100, hourly Compression, the status at the bottom right will show "Busy" for 80 - 100 seconds.
Taipan has no restrictions on the amount of titles subscribed to in real time and also RT tick data going back to 2002. Backfills are possible without restrictions. In addition, all European and American markets are available in real time.
One reason why I've been struggling to get the plugin to work properly for at least 3 days.
I've been an RT and EOD customer there for more than 20 years and will call on Monday.
But it is probably better to subscribe to IQFeed or eSignal on the highest possible subscription as I only do portfolio trading on N100, SP500, SP900, ASX200 and TSX60.
The plugins should work perfectly.
I have been using EOD with Amibroker anyway and exclusively Norgate for more than 2 years. RT Trading I am new to Amibroker.