金字塔均值回归交易系统源码[金字塔模型]
**** Hidden Message *****源码解析:
输出INPUT:N(5,1,10,1)
输出真实波幅:最高价-最低价的N日简单移动平均
输出 RUNMODE:0
ENTERTIME赋值:时间>=091500 AND 时间<=145500
EXITTIME赋值:时间>=150000
ATR赋值:"ASSIT.ATR[取日线数据]"
DIST赋值:上次日期<>昨日日期距今天数+1
HH赋值:昨日DIST日内最高价的最高值
LL赋值:昨日DIST日内最低价的最低值
BUYCOND赋值:ENTERTIME AND 最低价<=HH-ATR-MINDIFF
BUYPRICE赋值:HH-ATR-MINDIFF
BUYSHORTCOND赋值:ENTERTIME AND 最高价>=LL+ATR+MINDIFF
BUYSHORTPRICE赋值:LL+ATR+MINDIFF
逻辑判断 HOLDING=0 THEN BEGIN 逻辑判断 BUYCOND THEN BUY(1,1,LIMITR,BUYPRICE)
ENDIF HOLDING=0 THEN BEGIN 逻辑判断 BUYSHORTCOND THEN BUYSHORT(1,1,LIMITR,BUYSHORTPRICE)
ENDIF HOLDING>0 THEN BEGIN 逻辑判断 EXITTIME THEN SELL(1,HOLDING,LIMITR,收盘价)
ENDIF HOLDING<0 THEN BEGIN 逻辑判断 EXITTIME THEN SELLSHORT(1,HOLDING,LIMITR,收盘价)
输出END收益:(ASSET-30000)/30000,NOAXIS,画洋红色
输出次数:TOTALTRADE,线宽为0
输出胜率:PERCENTWIN,线宽为0
输出连亏:MAXSEQLOSS,线宽为0
输出连赢:MAXSEQWIN,线宽为0 感谢楼主,学习一下 学习学习学习学习
页:
[1]