- 精华
- 0
- 在线时间
- 30 小时
- UID
- 242468
- 积分
- 15
- 帖子
- 9
- 阅读权限
- 10
- 注册时间
- 2016-10-31
- 最后登录
- 2019-7-5
- 精华
- 0
- UID
- 242468
- 积分
- 15
- 帖子
- 9
- 主题
- 6
- 阅读权限
- 10
- 注册时间
- 2016-10-31
- 最后登录
- 2019-7-5
|
Params
Numeric Lots(0);//交易手数
Numeric Offset(0);//滑点数
Vars
NumericSeries Enterprice;//入场价格
NumericSeries Stoploseprice;//止损价格
NumericSeries closeprice;//收盘价
Begin
If(CurrentBar==0 || Date!=Date[1])
If(MarketPosition==0)
if(D != CurrentDate Or CurrentTime > 0.145700)
{c>CloseD(3) && c>CloseD(2);
Buy(Lots,Enterprice) ;
}
Else
{ c<CloseD(3) && c<CloseD(2);
SellShort(Lots,Enterprice);
}
end |
|