|
- Vars
- Numeric nCount;
- Numeric nEntryFlag;
- Numeric OrderPrice(9999999);
- String orderNo;
- Numeric i;
- Begin
- If(BarStatus==0)
- {
- SetGlobalVar(0,0);
- }
- nCount = A_GetOpenOrderCount();
- If(nCount==InvalidInteger) Return;
- If(GetGlobalVar(0)==0)
- {
- For i = 1 To nCount
- {
- nEntryFlag = A_OpenOrderEntryOrExit(i);//取得开平仓类型
- If(orderprice>A_OpenOrderPrice(i) && nEntryFlag == Enum_Entry)
- {
- OrderPrice=A_OpenOrderPrice(i);
- orderNo=A_OpenOrderContractNo(i);
- }
- }
- A_DeleteOrder(OrderNO);
- SetGlobalVar(0,1);
- }
-
-
- End
复制代码
|
|