placeOrder() IB

UniversalGoldmine

Junior member
Messages
26
Likes
0
I wonder how the correct way is to send an order using the .placeOrder() in IB.
When running this code I get an exception:

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I have put the arguments as long as I can think of but beleive perheps some arguments could be wrong where I am not really sure how to put them correct.
Arguments is as follows:
int id, string action, int quantity, string symbol, string secType, string expiry, double strike, string right, string multiplier, string exchange, string primary Exchange, string curency, string orderType, double price, double auxPrice, string goodAfterTime, string group, string faMethod, string faPercentage, string faProfile, string goodTillDate

Tws1.placeOrder(0, "Buy", 100, "MSFT", "STK", "200912", 0, "PUT", "", "SMART", "SMART", "USD", "LMT", 29, 0, "", "", "", "", "", "200912");
 
Top