I'm using FT3 and trying to create an automated strategy to test. This is my first attempt at strategy building for FT.
I seem to have no problem creating an instant order using the following code using the C++ API:
Code: Select all
if (SendInstantOrder(Currency, op_Buy, 0.1, 0, 0, "TestComment", 0, i_OrderHandle)) {
// get the entry price for the trade
TTradePosition info;
if (GetOrderInfo(i_OrderHandle, info) == true) {
// set the stop loss
ModifyOrder(i_OrderHandle, info.OpenPrice, (info.OpenPrice - (d_ATR * 3)), 0);
}
}
.... but.. the comment is not attached to the order and the comment field in the Account History window is empty.
Has any one seen this issue before and can make a suggestion on how to fix it? Is this same issue seen with the Delphi API? Am I doing something wrong here in setting the comment and if any one has some example code of how to do this correctly I would very much appreciate it. The information I can see in the API guide would make me think I am doing this correctly.
Many thanks in advance.