Here were my issues:
- The AmiBroker auto trader interface works in fire-and-forget mode. You don't receive events when an order executes, is rejected/cancelled, connection is dropped, etc. You need to periodically poll the interface for status.
- You set your AmiBroker code to execute every n seconds. It runs from scratch each time it executes -- you need to rely on static variables to keep your state (entry price, target price, etc).
- When I set the code to execute more than once every 15 seconds, the results from polling occasionally returned false information (it would return "null" for order status when an order was in fact still working).
- When I wanted to trade more than one instrument (say both GBP and EUR futures), polling order info on both of them consecutively would always return erronous information on the second one polled
Bookmarks