- 精华
- 0
- 在线时间
- 19 小时
- UID
- 5677
- 积分
- 51
- 帖子
- 3
- 阅读权限
- 30
- 注册时间
- 2009-10-16
- 最后登录
- 2019-3-24
- 精华
- 0
- UID
- 5677
- 积分
- 51
- 帖子
- 3
- 主题
- 1
- 阅读权限
- 30
- 注册时间
- 2009-10-16
- 最后登录
- 2019-3-24
|
之前的程序出现了信号消失的问题,我看了老师论坛里的教程,将程序修改了一下,请老师帮忙看一下这样修改对不对,还会不会出现信号消失的问题?
Vars
NumericSeries AvgClose;
Begin
AvgClose = AverageFC(Close,2);
If(marketposition!=1&&Time>=0.0905 )
{
if (Close[1]>Open[1]&&avgclose>=Close[1])
{
buy(1,close[1]+1*minmove*pricescale);
}else if(Close[1]<Open[1]&&Close>=High[1])
{
Buy(1,high[1]+1*minmove*pricescale);
}
}
If(marketposition!=-1 && time>=0.0905)
{
if(Close[1]<Open[1]&&avgclose<=Close[1])
{
sellshort(1,close[1]-1*minmove*pricescale);
}else if(Close[1]>Open[1]&&Close<Low[1])
{
Sellshort(1,low[1]-1*minmove*pricescale);
}
}
if( time>=0.1455 && MarketPosition!=0)
{
BuyToCover;
sell;
}
End |
|