- 精华
- 1
- 在线时间
- 436 小时
- UID
- 165
- 积分
- 55357
- 帖子
- 83
- 阅读权限
- 200
- 注册时间
- 2007-8-22
- 最后登录
- 2011-2-11
- 精华
- 1
- UID
- 165
- 积分
- 55357
- 帖子
- 83
- 主题
- 11
- 阅读权限
- 200
- 注册时间
- 2007-8-22
- 最后登录
- 2011-2-11
|
Vars
NumericSeries MidPrice; // 定义变量用于保存高低价的平均值。
NumericSeries AvePrice; // 用来保存中间变量
NumericSeries EnterPoint;
Numeric myEntryPrice ;
Begin
// IF (Currentbar>9)
//{
MidPrice = (High[1] + Low[1])/2;
AvePrice = Average(MidPrice,8);
EnterPoint=AvePrice[5];
Commentary("触发价:"+Text(EnterPoint));
If(CrossOver(high, EnterPoint ))
{
myEntryPrice = IIF(EnterPoint < Open, Open,EnterPoint);
buy(1, myEntryPrice);
}
If(CrossUnder(low, EnterPoint ))
{
myEntryPrice = IIF(EnterPoint > Open, Open,EnterPoint);
SellShort(1, myEntryPrice);
}
//}
End
大侠看看是怎么回事啊,谢谢 |
|