: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
: none;
color: rgb(85,85,85);
font-style. normal;
widows: 1;
letter-spacing: normal;
line-height: 18px;
background-color: rgb(246,249,251);
text-indent: 0px;
-webkit-text-stroke-width: 0px">
\'定时器触发事件函数,当有符合触发条件的时间出现后将调用这里,本范例是5秒循环调用一次
Sub APPLICATION_Timer(ID)
If Id = 0 Then
If strCode.Count > 0 Then
\'定时器中的代码比较简单,只要循环将数组的下单直接发送交易即可
Code = strCode.GetAt(0)
Market = strMarket.GetAt(0)
Vol = arVol.GetAt(0)
rderType = arOrderType.GetAt(0)
Set Report1 = marketdata.GetReportData(Code,Market)
If Report1 is nothing Then
Exit Sub
End If
If rderType = 0 Then
Price = Report1.SellPrice1 \'获取当前对手价格
If Price = 0 Then \'防止涨停板判断
Price = Report1.NewPrice
End If
call Order.Buy(0,Vol,Price,0,Code,Market,"",0)
ElseIf rderType = 1 Then
Price = Report1.BuyPrice1
If Price = 0 Then
Price = Report1.NewPrice
End If
call Order.Sell(0,Vol,Price,0,Code,Market,"",0)
ElseIf rderType = 2 Then
Price = Report1.BuyPrice1
If Price = 0 Then
Price = Report1.NewPrice
End If
call Order.BuyShort(0,Vol,Price,0,Code,Market,"",0)
ElseIf rderType = 3 Then
Price = Report1.SellPrice1
If Price = 0 Then
Price = Report1.NewPrice
End If
call Order.Sell(0,Vol,Price,0,Code,Market,"",0)
End If
\'处理完毕删除数组队列
strCode.RemoveAt(0)
strMarket.RemoveAt(0)
arVol.RemoveAt(0)
arOrderType.RemoveAt(0)
End If
End If
End Sub