Page 1 of 1

PlaceOrder function

Posted: 01 Feb 2008
by kevin kolodzy
Can you tell me if the PlaceOrder function is supported, and if so, are there any differences between the MCFX and TS implementations? Sample use:

PO_Rslt = PlaceOrder(
"Market", // OrderName
"Once", //Frequency
sAccountNumber, //Account
"Buy", //Action
"Forex", //SymbolCategory
GetSymbolName, //MySymbol
AdjustNumContracts, //Quantity SetDurationTo, // Duration
" ", // GTDDate
"Intelligent", // Route
"False", // AllOrNone
"False", // BuyMinusSellPlus
0, // Discretionary
"False", // ECNSweep
0, // IfTouched
0, // LimitPrice
"False", // NonDisplay
"False", // Peg
0, // ShowOnly
0, // StopPrice
0, // TrailingAmount
" " ) ; // TrailingType


To use it correctly, I believe the following must also be available to test for conditions in which it can or should be applied:

GetAppInfo(aiRealTimeCalc)
GetAppInfo(aiStrategyAuto)
GetAppInfo(aiStrategyAutoConf)
GetAppInfo(aiMacroEnabled)
GetAppInfo(aiMacroConf)
GetAppInfo(aiIntrabarOrder)

Thanks.

Posted: 08 Feb 2008
by kevin kolodzy
I've since discovered that the macro-related status items are not supported:

GetAppInfo(aiMacroEnabled)
GetAppInfo(aiMacroConf)

Can I assume that PlaceOrder is not supported? This is difficult to test without setting up an account and forcing certain conditions to occur - it is easier to ask if it is supported or not, and not waste time on it if not. Thanks.

Posted: 08 Feb 2008
by Marina Pashkova
The two functions above are indeed not supported. However, we haven't been able to find GetAppInfo(aiMacroConf) in the PlaceOrder code.
Thus the only unsupported function in the code is GetAppInfo(aiMacroEnabled). This function doesn't seem to be crucial for the correct work of PlaceOrder.

The only thing is that switch is not yet supported in MCFX. But switch can be replaced by the if...then constructions.

Regards.

Posted: 08 Feb 2008
by kevin kolodzy
Okay, if I understand you correctly, PlaceOrder IS supported, but some of the GetAppInfo function's status parameters such as aiMacroEnabled and aiMacroConf are not. I can work with that, if PlaceOrder is supported.