- 精华
- 0
- 在线时间
- 41 小时
- UID
- 109962
- 积分
- 27
- 帖子
- 15
- 阅读权限
- 10
- 注册时间
- 2012-4-12
- 最后登录
- 2012-5-10
- 精华
- 0
- UID
- 109962
- 积分
- 27
- 帖子
- 15
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2012-4-12
- 最后登录
- 2012-5-10
|
本帖最后由 suiyueran 于 2012-5-9 09:14 编辑
Params
Numeric lots(1);
//Numeric offset(2); //滑点
Vars
NumericSeries Tday(0);
NumericSeries upBand(0);
NumericSeries dnBand(0);
Begin
if(time>=0.1455)
{
if(MarketPosition==1)
sell(lots,close);
if(MarketPosition==-1)
{
buytocover(lots,close);
}
Return;
}
if(date<>date[1])
{
Tday=0;
}Else
{
if (time==0.1000)
{
Tday=o;
upBand = Tday*(1+0.0025);
dnBand = Tday*(1-0.0025);
}
}
PlotNumeric("text1",upBand);
PlotNumeric("text2",dnBand);
If(MarketPosition <>1 && Close[1] > upBand && time>0.1005 && time <0.1400)
{
Buy(lots,max( open ,upBand));
}
If(MarketPosition <>-1 && Close[1] < dnBand && time>0.1005 && time <0.1400)
{
SellShort(lots,min( open ,dnBand));
}
End
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|