- 精华
- 0
- 在线时间
- 95 小时
- UID
- 262417
- 积分
- 11
- 帖子
- 4
- 阅读权限
- 10
- 注册时间
- 2018-2-9
- 最后登录
- 2023-9-6
- 精华
- 0
- UID
- 262417
- 积分
- 11
- 帖子
- 4
- 主题
- 3
- 阅读权限
- 10
- 注册时间
- 2018-2-9
- 最后登录
- 2023-9-6
|
Vars
NumericSeries SFX;//5天高点
NumericSeries XFX;//5天低点
NumericSeries highafter;//记录高点
NumericSeries hcfudu;//回踩幅度
BoolSeries con1(False);
BoolSeries entrycon(False);
BoolSeries exitcon(false);
Begin
If(BarStatus==0)
{highafter=h;}
else{
highafter=Max(high,highafter[1]);}
SFX=SwingHigh(1,h,2,5);
XFX=SwingLow(1,l,2,5);
PlotNumeric("sfx",sfx);
PlotNumeric("xfx",xfx);
con1=CrossOver(h,sfx);
If(con1=true)hcfudu=sfx-xfx;
Commentary("hcfudu"+Text(hcfudu));
entrycon=CrossOver(c[1],sfx[1]);
exitcon=l<highafter-hcfudu;
if(entrycon==True and MarketPosition==0)
Buy(1,o);
if(exitcon==true and MarketPosition==1)
Sell(0,Min(highafter-hcfudu,o));
End
想实现的是突破高点做多,回踩超过上一次回踩的幅度就平仓,这个幅度应该怎么样传递下去,请版主和高手们帮忙解决; |
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
|