- 精华
- 0
- 在线时间
- 466 小时
- UID
- 110420
- 积分
- 547
- 帖子
- 326
- 阅读权限
- 50
- 注册时间
- 2012-5-11
- 最后登录
- 2019-1-11
- 精华
- 0
- UID
- 110420
- 积分
- 547
- 帖子
- 326
- 主题
- 16
- 阅读权限
- 50
- 注册时间
- 2012-5-11
- 最后登录
- 2019-1-11
|
本帖最后由 受伤的小鱼 于 2012-12-23 16:42 编辑
受伤的小鱼 发表于 2012-12-23 15:13
1243
Params
Numeric atrlen(19);
同样,我再继续为该策略加上幅度止盈后,虽说绩效能提高一点点,但。。。。。。。又是拟合上加拟合了,不过先放上先吧,其实长期来说,如果说策略有效,这些所谓的其它“技巧”都是拟合曲线!!!
Params
Numeric atrlen(19);
Numeric atrvl(1.30);
Numeric atrvs(2.50);
Numeric stlfd(100);
Numeric stln(1);
Numeric stffd(100);
Vars
Numeric offs;
NumericSeries atr;
Numeric uprail;
Numeric lorail;
Numeric lprice;
Numeric sprice;
BoolSeries entry01;
BoolSeries exit01;
BoolSeries exit02;
BoolSeries exit03;
BoolSeries exit04;
Numeric stlpr;
Numeric stfpr;
Begin
offs=MinMove*PriceScale;
atr=Average(h-l,atrlen);
uprail=open+atrvl*atr[1];
lorail=open-atrvs*atr[1];
lprice=uprail+2*offs;
sprice=lorail-2*offs;
stlpr=Min(open,LastEntryPrice*(1-stlfd/1000))-2*offs;
stfpr=Max(open,lastentryprice*(1+stffd/1000));
entry01=high>uprail;
Exit01=low小于lorail;
exit02=low小于LastEntryPrice*(1-stlfd/1000);
exit03=MarketPosition==1 and BarsSinceEntry>stln and low小于low[1];
exit04=MarketPosition==1 and high大于lastentryprice*(1+stffd/1000);
if (exit03) Sell(0,Min(open,low[1])-2*offs);
if (MarketPosition!=1 and entry01 ) Buy(0,lprice);
if (MarketPosition==1 and exit01 ) Sell(0,sprice);
if (exit02) Sell(0,stlpr);
if (exit04) Sell(0,stfpr);
//Commentary("swag"+Text(CountIf (entry01 and exit01,CurrentBar)));
end
天呐,被这个<>东西头啊搞大起来
基本是来说,幅度止盈损都无效,但要不要,得要,就是你要多少设多少,而不是拟合曲线给出来的多少是多少!!!
虽然说我主观上这么认为,而如果真在实盘过程的话,我却似乎肯定自己会去选拟合好后的参数,那么继续拟合吧。。。。。(所以我清仓有一部分原因也正是我觉得自己跳不出拟合这个框框,路过的同学敬请说一下对于此的看法) |
|