文华独特的形态箱体交易策略模型

[复制链接]
查看198 | 回复0 | 2021-8-22 16:25:03 | 显示全部楼层 |阅读模式

以下是文华独特的形态箱体交易策略模型(无源码的请下载附件导入)

文华独特的形态箱体交易策略模型

BAA:=1;
 MA4:=EMA(CLOSE,10)*BAA;
 HH:=HHV(HIGH,5)*BAA;
 LL:=LLV(LOW,5)*BAA;
 H1:=IFELSE(CLOSE>REF(HH,1),1,0)*BAA;
 L1:=IFELSE(CLOSE<REF(LL,1),-1,0)*BAA;
 H0:=REF(HIGH,1)*BAA;
 L0:=REF(LOW,1)*BAA;
 P7:=H1+L1*BAA;
 P8:=IFELSE(P7=0,REF(P7,1),P7)*BAA;
 P9:=IFELSE(P8=0,REF(P8,1),P8)*BAA;
 P10:=IFELSE(P9=0,REF(P9,1),P9)*BAA;
 P11:=IFELSE(P10=0,REF(P10,1),P10)*BAA;
 P12:=IFELSE(P11=0,REF(P11,1),P11)*BAA;
 P13:=IFELSE(P12=0,REF(P12,1),P12)*BAA;
 P14:=IFELSE(P13=0,REF(P13,1),P13)*BAA;
 P15:=IFELSE(P14=0,REF(P14,1),P14)*BAA;
 P16:=IFELSE(P15=0,REF(P15,1),P15)*BAA;
 P17:=IFELSE(P16=0,REF(P16,1),P16)*BAA;
 P18:=IFELSE(P17=0,REF(P17,1),P17)*BAA;
 P19:=IFELSE(P18=0,REF(P18,1),P18)*BAA;
 P20:=IFELSE(P19=0,REF(P19,1),P19)*BAA;
 P21:=IFELSE(P20=0,REF(P20,1),P20)*BAA;
 P22:=IFELSE(P21=0,REF(P21,1),P21)*BAA;
 P23:=IFELSE(P22=0,REF(P22,1),P22)*BAA;
 P24:=IFELSE(P23=0,REF(P23,1),P23)*BAA;
 P25:=IFELSE(P24=0,REF(P24,1),P24)*BAA;
 P26:=IFELSE(P25=0,REF(P25,1),P25)*BAA;
 P27:=IFELSE(P26=0,REF(P26,1),P26)*BAA;
 P28:=IFELSE(P27=0,REF(P27,1),P27)*BAA;
 P29:=IFELSE(P28=0,REF(P28,1),P28)*BAA;
 P30:=IFELSE(P29=0,REF(P29,1),P29)*BAA;
 T:=IFELSE(P30=0,REF(P30,1),P30)*BAA;
 T=1,BPK;
 T=-1,SPK;
 AUTOFILTER;//赢顺去掉该行

源码解析:

BAA赋值:1
 MA4赋值:收盘价的10日指数移动平均*BAA
 HH赋值:5日内最高价的最高值*BAA
 LL赋值:5日内最低价的最低值*BAA
 H1赋值:IFELSE(收盘价>昨日HH,1,0)*BAA
 L1赋值:IFELSE(收盘价<昨日LL,-1,0)*BAA
 H0赋值:昨日最高价*BAA
 L0赋值:昨日最低价*BAA
 P7赋值:H1+L1*BAA
 P8赋值:IFELSE(P7=0,昨日P7,P7)*BAA
 P9赋值:IFELSE(P8=0,昨日P8,P8)*BAA
 P10赋值:IFELSE(P9=0,昨日P9,P9)*BAA
 P11赋值:IFELSE(P10=0,昨日P10,P10)*BAA
 P12赋值:IFELSE(P11=0,昨日P11,P11)*BAA
 P13赋值:IFELSE(P12=0,昨日P12,P12)*BAA
 P14赋值:IFELSE(P13=0,昨日P13,P13)*BAA
 P15赋值:IFELSE(P14=0,昨日P14,P14)*BAA
 P16赋值:IFELSE(P15=0,昨日P15,P15)*BAA
 P17赋值:IFELSE(P16=0,昨日P16,P16)*BAA
 P18赋值:IFELSE(P17=0,昨日P17,P17)*BAA
 P19赋值:IFELSE(P18=0,昨日P18,P18)*BAA
 P20赋值:IFELSE(P19=0,昨日P19,P19)*BAA
 P21赋值:IFELSE(P20=0,昨日P20,P20)*BAA
 P22赋值:IFELSE(P21=0,昨日P21,P21)*BAA
 P23赋值:IFELSE(P22=0,昨日P22,P22)*BAA
 P24赋值:IFELSE(P23=0,昨日P23,P23)*BAA
 P25赋值:IFELSE(P24=0,昨日P24,P24)*BAA
 P26赋值:IFELSE(P25=0,昨日P25,P25)*BAA
 P27赋值:IFELSE(P26=0,昨日P26,P26)*BAA
 P28赋值:IFELSE(P27=0,昨日P27,P27)*BAA
 P29赋值:IFELSE(P28=0,昨日P28,P28)*BAA
 P30赋值:IFELSE(P29=0,昨日P29,P29)*BAA
 T赋值:IFELSE(P30=0,昨日P30,P30)*BAA
 T=1,BPK
 T=-1,SPK
 AUTOFILTER
 //赢顺去掉该行

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则