- 精华
- 0
- 在线时间
- 4 小时
- UID
- 238871
- 积分
- 2
- 帖子
- 1
- 阅读权限
- 10
- 注册时间
- 2016-8-15
- 最后登录
- 2016-11-23
- 精华
- 0
- UID
- 238871
- 积分
- 2
- 帖子
- 1
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2016-8-15
- 最后登录
- 2016-11-23
|
Params
Numeric length(14);
Numeric OverSold(20);
Numeric OverBought(80);
Vars
NumericSeries WRValue;
Bool Con1;
Bool Con2;
Numeric StopLossSet(20);
Numeric MinPoint;
Numeric MyExitPrice;
Numeric MyEntryPrice;
Begin
If(!CallAuctionFilter())Return;
WRValue=PercentR(length);
PlotNumeric("WR",WRValue);
PlotNumeric("超卖",OverBought);
PlotNumeric("超买",OverSold);
MinPoint=MinMove*PriceScale;
Con1=CrossOver(WRValue[1],OverBought);
Con2=CrossUnder(WRValue[1],OverSold);
If(Con1 And MarketPosition==0 And Vol>0)
{
SellShort(1,Open);
MyEntryPrice=Open;
If(High>MyEntryPrice+StopLossSet*MinPoint)
{
MyExitPrice=MyEntryPrice+StopLossSet*MinPoint;
If(Open>MyExitPrice)MyExitPrice=Open;
BuyToCover(1,MyExitPrice);
}
If(Con2 And MarketPosition==1 And Vol>0)
BuyToCover(1,Open);
}
Else If(Con2 And MarketPosition==0 And Vol>0)
{
Buy(1,Open);
MyEntryPrice=Open;
If(Low<MyEntryPrice-StopLossSet*MinPoint)
{
MyExitPrice=MyEntryPrice-StopLossSet*MinPoint;
If(Open<MyExitPrice)MyExitPrice=Open;
Sell(1,MyExitPrice);
}
If(Con1 And MarketPosition==1 And Vol>0)
Sell(1,Open);
}
End |
|