金字塔超级日内组合策略源码[金字塔模型]
相关标签:日内交易策略,黄金外汇日内交易策略,日内期货交易 策略,期货日内超级短线交易,日内短线期货交易系统,股指期货日内交易系统,顶底财神日内交易系统,日内五分钟交易系统,哈里的日内策略,
模型策略源码:
{别忘了将本网告诉您身边的朋友,向朋友传达有用资料,也是一种人情,你朋友会感谢你的。}
源码解析:
输出RUNMODE:0
输出INPUT:WAITPERIODMINS(30)
输出INPUT:INITTRADESENDTIME(143000)
输出INPUT:LIQREVENDTIME(110000)
输出INPUT:THRUSTPRCNT1(0.3)
输出INPUT:THRUSTPRCNT2(0.6)
输出INPUT:BREAKOUTPRCNT(0.25)
输出INPUT:FAILEDBREAKOUTPRCNT(0.25)
输出INPUT:PROTSTOPPRCNT1(0.25)
输出INPUT:PROTSTOPPRCNT2(0.15)
输出INPUT:PROTSTOPAMT(3)
输出INPUT:BREAKEVENPRCNT(0.5)
输出INPUT:AVGRNGLENGTH(10)
输出INPUT:AVGOCLENGTH(10)
输出VARIABLE:AVERAGERANGE=0
输出VARIABLE:AVERAGEOCRANGE=0
输出VARIABLE:CANTRADE=0
输出VARIABLE:BUYEASIERDAY=FALSE
输出VARIABLE:SELLEASIERDAY=FALSE
输出VARIABLE:BUYBOPOINT=0
输出VARIABLE:SELLBOPOINT=0
输出VARIABLE:LONGBREAKPT=0
输出VARIABLE:SHORTBREAKPT=0
输出VARIABLE:LONGFBOPOINT=0
输出VARIABLE:SHORTFBOPOINT=0
输出VARIABLE:BARCOUNT=0
输出VARIABLE:INTRAHIGH=0
输出VARIABLE:INTRALOW=999999
输出VARIABLE:BUYSTODAY=0
输出VARIABLE:SELLSTODAY=0
输出VARIABLE:CURRTRDTYPE=0
输出VARIABLE:LONGLIQPOINT=0
输出VARIABLE:SHORTLIQPOINT=0
输出VARIABLE:YESTERDAYOCRRANGE=0
输出VARIABLE:INTRATRADEHIGH=0
输出VARIABLE:INTRATRADELOW=999999
M1赋值:昨日CALLSTOCK(STKLABEL,VTHIGH,6,0)-CALLSTOCK(STKLABEL,VTLOW,6,0)的10日简单移动平均
M2赋值:昨日CALLSTOCK(STKLABEL,VTOPEN,6,0)-CALLSTOCK(STKLABEL,VTCLOSE,6,0)的绝对值的10日简单移动平均
M3赋值:昨日3日内最低价的最低值
M4赋值:昨日3日内最高价的最高值
AVERAGERANGE赋值:M1
GE赋值:开盘价-收盘价的绝对值
AVERAGEOCRANGE赋值:M2
CANTRADE赋值:0
CANTRADE赋值:1
BUYEASIERDAY赋值:FALSE
SELLEASIERDAY赋值:FALSE
BUYEASIERDAY赋值:TRUE
SELLEASIERDAY赋值:TRUE
BUYBOPOINT赋值:CALLSTOCK(STKLABEL,VTOPEN,6,0)+THRUSTPRCNT1*AVERAGERANGE
SELLBOPOINT赋值:CALLSTOCK(STKLABEL,VTOPEN,6,0)-THRUSTPRCNT2*AVERAGERANGE
SELLBOPOINT赋值:CALLSTOCK(STKLABEL,VTOPEN,6,0)-THRUSTPRCNT1*AVERAGERANGE
BUYBOPOINT赋值:CALLSTOCK(STKLABEL,VTOPEN,6,0)+THRUSTPRCNT2*AVERAGERANGE
LONGBREAKPT赋值:CALLSTOCK(STKLABEL,VTHIGH,6,-1)+BREAKOUTPRCNT*AVERAGERANGE
SHORTBREAKPT赋值:CALLSTOCK(STKLABEL,VTLOW,6,-1)-BREAKOUTPRCNT*AVERAGERANGE
SHORTFBOPOINT赋值:CALLSTOCK(STKLABEL,VTHIGH,6,-1)-FAILEDBREAKOUTPRCNT*AVERAGERANGE
LONGFBOPOINT赋值:CALLSTOCK(STKLABEL,VTLOW,6,-1)+FAILEDBREAKOUTPRCNT*AVERAGERANGE
BARCOUNT赋值:0
INTRAHIGH赋值:0
INTRALOW赋值:999999
BUYSTODAY赋值:0
SELLSTODAY赋值:0
CURRTRDTYPE赋值:0
INTRAHIGH赋值:最高价
INTRALOW赋值:最低价
BARCOUNT赋值:BARCOUNT+1
INTRATRADEHIGH赋值:0
INTRATRADELOW赋值:999999
INTRATRADEHIGH赋值:INTRATRADEHIGH和最高价的较大值
BUYSTODAY赋值:1
INTRATRADELOW赋值:INTRATRADELOW和最低价的较小值
SELLSTODAY赋值:1
输出 END 逻辑判断 BUYSTODAY=0 AND 时间<INITTRADESENDTIME THEN LBREAKOUT:BUY(1,1,STOP,BUYBOPOINT)
输出 逻辑判断 SELLSTODAY=0 AND 时间<INITTRADESENDTIME THEN SBREAKOUT:SELLSHORT(1,1,STOP,SELLBOPOINT)
输出 逻辑判断 INTRAHIGH>LONGBREAKPT AND SELLSTODAY=0 AND 时间<INITTRADESENDTIME THEN SFAILEDBO:SELLSHORT(1,1,STOP,SHORTFBOPOINT)
输出 逻辑判断 INTRALOW<SHORTBREAKPT AND BUYSTODAY=0 AND 时间<INITTRADESENDTIME THEN BFEILEDBO:BUY(1,1,STOP,LONGFBOPOINT)
LONGLIQPOINT赋值:ENTERPRICE-PROTSTOPPRCNT1*AVERAGERANGE
LONGLIQPOINT赋值:LONGLIQPOINT和ENTERPRICE-PROTSTOPAMT的较小值
CURRTRDTYPE赋值:-2
LONGLIQPOINT赋值:ENTERPRICE-PROTSTOPPRCNT2*AVERAGERANGE
LONGLIQPOINT赋值:LONGLIQPOINT和ENTERPRICE-PROTSTOPAMT的较小值
LONGLIQPOINT赋值:ENTERPRICE
LONGLIQPOINT赋值:LONGLIQPOINT和M3的较大值
输出 逻辑判断 时间<LIQREVENDTIME AND SELLSTODAY=0 AND LONGLIQPOINT<>ENTERPRICE AND ENTERBARS>=4 THEN BEGIN LONGLIQREV:SELLSHORT(1,1,STOP,LONGLIQPOINT)
输出 END ELSE BEGIN LONGLIQ:SELL(1,1,STOP,LONGLIQPOINT)
SHORTLIQPOINT赋值:ENTERPRICE+PROTSTOPPRCNT1*AVERAGERANGE
SHORTLIQPOINT赋值:SHORTLIQPOINT和ENTERPRICE+PROTSTOPAMT的较大值
CURRTRDTYPE赋值:2
SHORTLIQPOINT赋值:ENTERPRICE+PROTSTOPPRCNT2*AVERAGERANGE
SHORTLIQPOINT赋值:SHORTLIQPOINT和ENTERPRICE+PROTSTOPAMT的较大值
SHORTLIQPOINT赋值:ENTERPRICE
SHORTLIQPOINT赋值:SHORTLIQPOINT和M4的较小值
输出 逻辑判断 时间<LIQREVENDTIME AND BUYSTODAY=0 AND SHORTLIQPOINT<>ENTERPRICE AND ENTERBARS>=4 THEN BEGIN SHORTLIQREV:BUY(1,1,STOP,SHORTLIQPOINT)
输出 END ELSE BEGIN SHORTLIQ:SELLSHORT(1,1,STOP,SHORTLIQPOINT)
END ENDENDIF 时间>=CLOSETIME(0) THEN BEGIN SELL(1,HOLDING,LIMITR,收盘价)
SELLSHORT(1,HOLDING,LIMITR,收盘价)
输出END盈亏:ASSET-500000,NOAXIS,画黄色,线宽为2
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容