- 精华
- 0
- 在线时间
- 18 小时
- UID
- 1641
- 积分
- 100
- 帖子
- 19
- 阅读权限
- 30
- 注册时间
- 2008-5-21
- 最后登录
- 2010-10-4
- 精华
- 0
- UID
- 1641
- 积分
- 100
- 帖子
- 19
- 主题
- 11
- 阅读权限
- 30
- 注册时间
- 2008-5-21
- 最后登录
- 2010-10-4
|
回复 #2 bearhug 的帖子
以下公式,是哪里定义手数,请指出,谢谢!
Params
Numeric AfStep( 0.02);
Numeric AfLimit( 0.2 );
Numeric StopPoint(6);
Vars
NumericSeries SARValue;
Numeric MyPrice;
Numeric oParCl( 0 );
Numeric oParOp( 0 );
Numeric oPosition( 0 );
Numeric oTransition( 0 );
Begin
ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition );
SARValue = oParCl;
If(MarketPosition!=0)
{
If(Time >= 0.1458 && Time < 0.1500)
{
Sell(1,Close);
BuyToCover(1,Close);
Return;
}
If(MarketPosition == 1 && Low <= AvgEntryPrice-StopPoint*MinMove*PriceScale)
{
MyPrice = AvgEntryPrice-StopPoint*MinMove*PriceScale;
Sell(1,MyPrice);
}
If(MarketPosition == -1 && High >= AvgEntryPrice+StopPoint*MinMove*PriceScale)
{
MyPrice = AvgEntryPrice+StopPoint*MinMove*PriceScale;
BuyToCover(1,MyPrice);
}
}
If(MarketPosition !=1 && CrossOver(Close,SARValue))
{
Buy(1,Close);
}
If(MarketPosition !=-1 && CrossUnder(Close,SARValue))
{
SellShort(1,Close);
}
End |
|