我从mt4官网下载了软件,申请了一个demo账号,然后运行如下代码:
- int globalint1 = 0;
- int start()
- {
- int order;
- int total;
- int select;
- int ii;
- if ( globalint1 == 0)
- {
- order = OrderSend(NULL, OP_BUYSTOP, 1, 5000, 0, 4900, 5100, NULL, 0, 0, clrAqua);
- globalint1 = 1;
- }
-
- total = OrdersTotal();
- for (ii = total-1;ii>=0;ii--)
- {
- select = OrderSelect( ii, SELECT_BY_POS, MODE_TRADES );
- Print( "orderopenprice", OrderOpenPrice() );
- }
- return(0);
- }
|