麻烦版主帮忙看一下。
用在日线上,价格低于两日低点开空,高于昨天高点就平仓,做多反之,这样写合适吗?Begin
If(!CallAuctionFilter()) Return;
highd1 = HighD(1);
highd2 = HighD(2);
lowd1 = LowD(1);
lowd2 = LowD(2);
MyEntryPrice = AvgEntryPrice;
MinPoint = MinMove*PriceScale;
BK = HighD1 < highd2 && High > highd2 ;
BP = Low <lowd1;
SK = lowD1 > lowd2 && Low< LOWD2;
SP = High>HIGHD1;
BS = Low < MyEntryPrice-MinPoint*8;
SS = High > MyEntryPrice+minpoint*8;
If (BK && MarketPosition != 1 && CS < 2)
Buy(Lots,High);
Commentary("bk");
cs = cs+1;
If (BP && MarketPosition == 1)
Sell(Lots,low);
Commentary("BP");
If (sk && MarketPosition != -1 && CS <2)
SellShort(Lots,low);
Commentary("SK");
cs = cs+1;
If (sp && MarketPosition == -1)
BuyToCover(Lots,high);
Commentary("SP");
If (BS && MarketPosition ==1)
Sell(Lots,low);
Commentary("Bs");
If (ss && MarketPosition == -1)
BuyToCover(Lots,high);
Commentary("SS");
End
页:
[1]