您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经公式>>正文内容

橡胶PTA商品通用量价时空兼顾交易模型源码[文华财经公式]

橡胶PTA商品通用量价时空兼顾交易模型源码  网友提供,仅供参考

用于文华赢智版



T1:=(TIME>0900 AND TIME<1455);//
T2:=(TIME>1015 AND TIME<1455);//
T3:=(TIME>1455);
CJL:=(VOL>=MA(MAX(MA(VOL,5),MA(VOL,3)),9) OR VOL>=MA(MAX(MA(VOL,5),MA(VOL,3)),12) OR VOL>=MA(MAX(MA(VOL,5),MA(VOL,3)),15) OR VOL>=MA(MAX(MA(VOL,5),MA(VOL,3)),18));//成交量
JL:=((HIGH-REF(LOW,1))>=3 AND (HIGH-REF(LOW,2))>=4) AND (((HHV(HIGH,3)-LLV(LOW,3))>=5 OR (HHV(HIGH,6)-LLV(LOW,6))>=6 OR (HHV(HIGH,9)-LLV(LOW,9))>=7 OR (HHV(HIGH,12)-LLV(LOW,12))>=8)) AND (HIGH>=REF(HHV(HIGH,12),1)+1);//急拉
MD1:=((REF(HIGH,1)-LOW)>=5 AND (REF(HIGH,2)-LOW)>=6) AND (((HHV(HIGH,3)-LLV(LOW,3))>=7 OR (HHV(HIGH,6)-LLV(LOW,6))>=8 OR (HHV(HIGH,9)-LLV(LOW,9))>=9 OR (HHV(HIGH,12)-LLV(LOW,12))>=10)) AND (LOW<=REF(LLV(LOW,12),1)-2);//猛打
BZ:=((HIGH-REF(LOW,1))>=3 AND (HIGH-REF(LOW,2))>=4) AND (((HHV(HIGH,3)-LLV(LOW,3))>=5 OR (HHV(HIGH,4)-LLV(LOW,4))>=6 OR (HHV(HIGH,5)-LLV(LOW,5))>=7 OR (HHV(HIGH,6)-LLV(LOW,6))>=8)) AND (HIGH>=REF(HHV(HIGH,12),1)+1);//暴涨
BD:=((REF(HIGH,1)-LOW)>=5 AND (REF(HIGH,2)-LOW)>=6) AND (((HHV(HIGH,3)-LLV(LOW,3))>=7 OR (HHV(HIGH,4)-LLV(LOW,4))>=8 OR (HHV(HIGH,5)-LLV(LOW,5))>=9 OR (HHV(HIGH,6)-LLV(LOW,6))>=10)) AND (LOW<=REF(LLV(LOW,12),1)-2);//暴跌 CXH99.COM
BF:=((HIGH>=HHV(HIGH,12) OR HIGH>=HHV(HIGH,18) OR HIGH>=HHV(HIGH,24) OR HIGH>=HHV(HIGH,30) OR HIGH>=HHV(HIGH,36)) AND (HIGH>=REF(HHV(HIGH,12),1)+3));//波峰
BG:=((LOW<=LLV(LOW,12) OR LOW<=LLV(LOW,18) OR LOW<=LLV(LOW,24) OR LOW<=LLV(LOW,30) OR LOW<=LLV(LOW,36)) AND (LOW<=REF(LLV(LOW,12),1)-5));//波谷
A51:=(REF(VOL,1)>=MA(HHV(MAX(MA(REF(VOL,1),5),MA(REF(VOL,1),3)),10),3)  AND REF(HIGH,1)>=MA(HHV(MAX(MA(REF(CLOSE,1),3),MA(REF(OPEN,1),3)),10),3));//天量天价}
A52:=((REF(H,1)-MA(REF(CLOSE,1),10))/MA(REF(CLOSE,1),10)*100>=0.1);//5周期乖离率}
A53:=(3*SMA((REF(HIGH,1)-LLV(REF(LOW,1),5))/(HHV(REF(HIGH,1),5)-LLV(REF(LOW,1),5))*100,5,1)-2*SMA(SMA((REF(HIGH,1)-LLV(REF(LOW,1),5))/(HHV(REF(HIGH,1),5)-LLV(REF(LOW,1),5))*100,5,1),5,1)>=80);//5周期KDJ www.cxh99.com}
A54:=(SMA(MAX(REF(HIGH,1)-REF(HIGH,2),0),5,1)/SMA(ABS(REF(HIGH,1)-REF(HIGH,2)),5,1)*100>=70);//5周期RSI}
A55:=(100*(HHV(REF(HIGH,1),5)-REF(CLOSE,1))/(HHV(REF(HIGH,1),5)-LLV(REF(LOW,1),5))<=30);//5周期WR}
A56:=((REF(HIGH,1)-HHV(REF(HIGH,2),5)>=3)  OR  (REF(HIGH,1)-LLV(REF(LOW,2),5)>=5));
A57:=(REF(HIGH,1)>=HHV(REF(HIGH,1),5) OR  REF(HIGH,1)>=HHV(REF(HIGH,1),10) OR  REF(HIGH,1)>=HHV(REF(HIGH,1),15) OR  REF(HIGH,1)>=HHV(REF(HIGH,1),20) OR  REF(HIGH,1)>=HHV(REF(HIGH,1),25) OR  REF(HIGH,1)>=HHV(REF(HIGH,1),30));//昨周期波峰}
A58:=((OPEN+HIGH+LOW)/3<=(REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1))/3  AND MA((OPEN+HIGH+LOW)/3,2)/MA((OPEN+HIGH+LOW)/3,3)<=MA((REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1))/3,2)/MA((REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1))/3,3));//变异平均线VMA}
A59:=(SMA(MAX(HIGH-REF(HIGH,1),0),5,1)/SMA(ABS(HIGH-REF(HIGH,1)),5,1)*100<=SMA(MAX(REF(HIGH,1)-REF(HIGH,2),0),5,1)/SMA(ABS(REF(HIGH,1)-REF(HIGH,2)),5,1)*100);//相对强弱RSI}
A5:=(A51  AND A52  AND A53  AND A54  AND A55  AND A56  AND A57  AND (A58  OR  A59));//开空6}
B51:=(REF(VOL,1)>=MA(HHV(MAX(MA(REF(VOL,1),3),MA(REF(VOL,1),2)),10),3)  AND REF(LOW,1)<=MA(LLV(MIN(MA(REF(CLOSE,1),3),MA(REF(OPEN,1),3)),10),3));//天量地价}
B52:=((REF(L,1)-MA(REF(CLOSE,1),10))/MA(REF(CLOSE,1),10)*100<=-0.1);//5周期乖离率}
B53:=(3*SMA((REF(LOW,1)-LLV(REF(LOW,1),5))/(HHV(REF(HIGH,1),5)-LLV(REF(LOW,1),5))*100,5,1)-2*SMA(SMA((REF(LOW,1)-LLV(REF(LOW,1),5))/(HHV(REF(HIGH,1),5)-LLV(REF(LOW,1),5))*100,5,1),5,1)<=20);//5周期KDJ}
B54:=(SMA(MAX(REF(LOW,1)-REF(LOW,2),0),5,1)/SMA(ABS(REF(LOW,1)-REF(LOW,2)),5,1)*100<=30);//5周期RSI WWW.CXH99.COM}
B55:=(100*(HHV(REF(HIGH,1),5)-REF(CLOSE,1))/(HHV(REF(HIGH,1),5)-LLV(REF(LOW,1),5))>=70);//5周期WR}
B56:=((LLV(REF(LOW,2),5)-REF(LOW,1)>=5)  OR  (HHV(REF(HIGH,2),5)-REF(LOW,1)>=10));
W W W.C X H 9 9.C O M:C,NODRAW;
B57:=(REF(LOW,1)<=LLV(REF(LOW,1),5) OR  REF(LOW,1)<=LLV(REF(LOW,1),10) OR  REF(LOW,1)<=LLV(REF(LOW,1),15) OR  REF(LOW,1)<=LLV(REF(LOW,1),20) OR  REF(LOW,1)<=LLV(REF(LOW,1),25) OR  REF(LOW,1)<=LLV(REF(LOW,1),30));//昨周期波谷}
B58:=((OPEN+HIGH+LOW)/3>=(REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1))/3  AND MA((OPEN+HIGH+LOW)/3,2)/MA((OPEN+HIGH+LOW)/3,3)>=MA((REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1))/3,2)/MA((REF(OPEN,1)+REF(HIGH,1)+REF(LOW,1))/3,3));//变异平均线VMA}
B59:=(SMA(MAX(LOW-REF(LOW,1),0),5,1)/SMA(ABS(LOW-REF(LOW,1)),5,1)*100>=SMA(MAX(REF(LOW,1)-REF(LOW,2),0),5,1)/SMA(ABS(REF(LOW,1)-REF(LOW,2)),5,1)*100);//相对强弱RSI}
B5:=(B51  AND B52  AND B53  AND B54  AND B55  AND B56  AND B57  AND (B58  OR  B59));//多开6}
TT:=(BARSLAST(DATE<>REF(DATE,1))+1);//今天 CXH99.COM
H1:=(T2 AND HIGH>=HHV(HIGH,TT));//今天开盘以来最高价
L1:=(T2 AND LOW<=LLV(LOW,TT));//今天开盘以来最低价
KDSS:=IFELSE(BKVOL>0,BKVOL,1);//开多手数
KKSS:=IFELSE(SKVOL>0,SKVOL,1);//开空手数
PDSS:=IFELSE(BKVOL>3,INTPART(BKVOL/2),1);//平多手数
PKSS:=IFELSE(SKVOL>3,INTPART(SKVOL/2),1);//平空手数
T1 AND (B5 OR (T2 AND L1) OR (MD1 OR BD)),BP(PKSS*MYVOL);//平空信号
T1 AND BG AND ((CJL AND (MD1 OR BD)) OR B5 OR (T2 AND L1)),BK(KDSS*MYVOL);//开多信号
T1 AND (A5 OR (T2 AND H1) OR (JL OR BZ)),SP(PDSS*MYVOL);//平多信号
T1 AND BF AND ((CJL AND (JL OR BZ)) OR A5 OR (T2 AND H1)),SK(KKSS*MYVOL);//开空信号
MONO_SIGNAL;//一根K线只支持一个信号,取最先出现的信号作为有效信号。
T3,CLOSEOUT;//尾盘清仓,确保T+0交易

 

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 1145508240  有需要帮忙请点击这里留言!!!进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容