When submitting a trade order, e.g. market order, using the terminal:execute() function, I am checking that it was executed properly in the AsyncOperationFinished() call-back (or ExtAsyncOperationFinished() when the helper file is used).
ExtAsyncOperationFinished(cookie, success, message)
According to the SDK, and previously this worked, the "message" should be the orderId of a successfully completed order.
Extract from SDK help file...
- Code: Select all
cookie
An integer value specified for the operation in the execute() method.
successful
A boolean flag indicating whether the order has been successfully executed on the server.
info
A string, which contains:
[in case successful is true] The order identifier for the the create order commands or an empty string in all other cases.
[in case successful is false] The error text received from the server.
The "message" (which was called "info" in the above extract from SDK) used to be the orderID, which could be saved for reference, displayed, etc. etc. now is coming over as "nil".
This has caused my strategies to fail, which are expecting a valid order number here.
See screenshot 1 (from TradingStation)...
The back-tester is still working as it used to do. See screenshot 2 (from back-tester)...
Please see the attached test code (which is basically a copy of a code segment from the SDK).
Any idea what happened? Is it problem with TS2 or is the server somehow now sending back the order id?