欢迎光临
专业期货策略平台

橡胶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交易

0 0 vote
Article Rating
Click to rate this post!
[Total: 0 Average: 0]
赞(0) 打赏
未经允许不得转载:A期客 » 橡胶PTA通用量价时空兼顾交易策略模型代码下载
订阅
提醒
guest
0 评论
Inline Feedbacks
View all comments

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

0
Would love your thoughts, please comment.x
()
x