This does not work. I tried this code multiple times and the specified price is not getting respected.
res=trade.OrderOpen("MESH23", ORDER_TYPE_BUY_LIMIT, 1, 0, 4022.75, 0, 0);
Actual filled price: 4023.
I'm using AMP Demo account and for some reason limit orders are not real limit orders...