运行不了!奇怪 [文华财经]
-
咨询内容:
请问为啥运行不了
1过滤:=FILTER(BACKSET(FILTER(REF(H,5)=HHV(H,2*5+1),5),5+1),5);
D2过滤:=FILTER(BACKSET(FILTER(REF(L,5)=LLV(L,2*5+1),5),5+1),5);
H1过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1过滤:=D2过滤 AND NOT((D1过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2<(H+L)/2));
H2过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2));
F1过滤:=BACKSET(H1过滤 AND COUNT(L1过滤,REF(BARSLAST(H1过滤),1)+1)>0,LLVBARS(L,REF(BARSLAST(H1过滤),1)+1)+1);
LD过滤:=BACKSET(F1过滤>REF(F1过滤,1),1)>REF(BACKSET(F1过滤>REF(F1过滤,1),1),1);
L2过滤:=LD过滤 OR ISLASTBAR OR BARSCOUNT(C)=1;
F2过滤:=BACKSET(L2过滤 AND COUNT(H2过滤,REF(BARSLAST(L2过滤),1)+1)>0,HHVBARS(H,REF(BARSLAST(L2过滤),1)+1)+1);
HD过滤:=BACKSET(F2过滤>REF(F2过滤,1),1)>REF(BACKSET(F2过滤>REF(F2过滤,1),1),1);
HH过滤:=HD过滤&&NOT(LD过滤)&&REFX1(BACKSET(HD过滤&&H>HV(H,BARSLAST(LD过滤)),BARSLAST(LD过滤))<>1,1);
LL过滤:=LD过滤&&NOT(HD过滤)&&REFX1(BACKSET(LD过滤&&L<LV(L,BARSLAST(HD过滤)),BARSLAST(HD过滤))<>1,1);
AA:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,2));
BB:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,2));
CC:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤))-REF(H,SUMBARS(HH过滤=1,2)),REF(H,BARSLAST(HH过滤))-REF(L,SUMBARS(LL过滤=1,2)));
DD:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤)),REF(H,BARSLAST(HH过滤)));
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)>=0,L,HH过滤&&AA&&REFX1(CC,10000)>=0,H,0),COLORRED;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)>=0,H,LL过滤&&BB&&REFX1(CC,10000)>=0,L,0),COLORRED;
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)<0,L,HH过滤&&AA&&REFX1(CC,10000)<0,H,0),COLORGREEN;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)<0,H,LL过滤&&BB&&REFX1(CC,10000)<0,L,0),COLORGREEN;
SS:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,1));
QQ:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,1));
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,1);
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,0);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,1);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,0);
(心预期支阻) 盈加风控!平反验证:
IF(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),0.5),L),NULL),COLORRED,NODRAW;
(心预期阻支) 限亏风控!平反验证:
IF(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),0.5),H),NULL),COLORGREEN,NODRAW;
LL1:=LL过滤&&BB&&REFX1(CC,10000)>=0;
LL2:=LL过滤&&BB&&REFX1(CC,10000)<0;
HH1:=HH过滤&&AA&&REFX1(CC,10000)>=0;
HH2:=HH过滤&&AA&&REFX1(CC,10000)<0;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=1&&EXIST(HH1,BARPOS)=0,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=2&&COUNT(HH1,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=1&&EXIST(LL1,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=2&&COUNT(LL1,BARPOS)=2,H,'',COLORBLACK;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=1&&EXIST(HH1,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=2&&COUNT(HH1,BARPOS)=2,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=1&&EXIST(LL1,BARPOS)=0,H,'',COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=2&&COUNT(LL1,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=1&&EXIST(LL2,BARPOS)=0,H,'',COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=2&&COUNT(LL2,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=1&&EXIST(HH2,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=2&&COUNT(HH2,BARPOS)=2,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=1&&EXIST(LL2,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=2&&COUNT(LL2,BARPOS)=2,H,'',COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=1&&EXIST(HH2,BARPOS)=0,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=2&&COUNT(HH2,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)>=0,L,HH过滤&&AA&&REFX1(CC,10000)>=0,H,0),COLORRED;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)>=0,H,LL过滤&&BB&&REFX1(CC,10000)>=0,L,0),COLORRED;
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)<0,L,HH过滤&&AA&&REFX1(CC,10000)<0,H,0),COLORGREEN;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)<0,H,LL过滤&&BB&&REFX1(CC,10000)<0,L,0),COLORGREEN;
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,1);
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,0);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,1);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,0);
H1:=HH过滤&&AA&&REFX1(CC,10000)>=0;
HH:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,1)),0.5);
来源:程序化99
-
文华技术人员:
参考:
D1过滤:=FILTER(BACKSET(FILTER(REF(H,5)=HHV(H,2*5+1),5),5+1),5);
D2过滤:=FILTER(BACKSET(FILTER(REF(L,5)=LLV(L,2*5+1),5),5+1),5);
H1过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1过滤:=D2过滤 AND NOT((D1过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2<(H+L)/2));
H2过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2));
F1过滤:=BACKSET(H1过滤 AND COUNT(L1过滤,REF(BARSLAST(H1过滤),1)+1)>0,LLVBARS(L,REF(BARSLAST(H1过滤),1)+1)+1);
LD过滤:=BACKSET(F1过滤>REF(F1过滤,1),1)>REF(BACKSET(F1过滤>REF(F1过滤,1),1),1);
L2过滤:=LD过滤 OR ISLASTBAR OR BARSCOUNT(C)=1;
F2过滤:=BACKSET(L2过滤 AND COUNT(H2过滤,REF(BARSLAST(L2过滤),1)+1)>0,HHVBARS(H,REF(BARSLAST(L2过滤),1)+1)+1);
HD过滤:=BACKSET(F2过滤>REF(F2过滤,1),1)>REF(BACKSET(F2过滤>REF(F2过滤,1),1),1);
HH过滤:=HD过滤&&NOT(LD过滤)&&REFX1(BACKSET(HD过滤&&H>HV(H,BARSLAST(LD过滤)),BARSLAST(LD过滤))<>1,1);
LL过滤:=LD过滤&&NOT(HD过滤)&&REFX1(BACKSET(LD过滤&&L<LV(L,BARSLAST(HD过滤)),BARSLAST(HD过滤))<>1,1);
AA:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,2));
BB:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,2));
CC:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤))-REF(H,SUMBARS(HH过滤=1,2)),REF(H,BARSLAST(HH过滤))-REF(L,SUMBARS(LL过滤=1,2)));
DD:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤)),REF(H,BARSLAST(HH过滤)));
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)>=0,L,HH过滤&&AA&&REFX1(CC,10000)>=0,H,0),COLORRED;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)>=0,H,LL过滤&&BB&&REFX1(CC,10000)>=0,L,0),COLORRED;
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)<0,L,HH过滤&&AA&&REFX1(CC,10000)<0,H,0),COLORGREEN;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)<0,H,LL过滤&&BB&&REFX1(CC,10000)<0,L,0),COLORGREEN;
SS:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,1));
QQ:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,1));
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,1);
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,0);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,1);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,0);
(心预期支阻) 盈加风控!平反验证:
IF(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),0.5),L),NULL),COLORRED,NODRAW;
(心预期阻支) 限亏风控!平反验证:
IF(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),0.5),H),NULL),COLORGREEN,NODRAW;
LL1:=LL过滤&&BB&&REFX1(CC,10000)>=0;
LL2:=LL过滤&&BB&&REFX1(CC,10000)<0;
HH1:=HH过滤&&AA&&REFX1(CC,10000)>=0;
HH2:=HH过滤&&AA&&REFX1(CC,10000)<0;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=1&&EXIST(HH1,BARPOS)=0,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=2&&COUNT(HH1,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=1&&EXIST(LL1,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=2&&COUNT(LL1,BARPOS)=2,H,'',COLORBLACK;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=1&&EXIST(HH1,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL1&&COUNT(LL1,BARPOS)=2&&COUNT(HH1,BARPOS)=2,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=1&&EXIST(LL1,BARPOS)=0,H,'',COLORBLACK;
DRAWTEXT(HH1&&COUNT(HH1,BARPOS)=2&&COUNT(LL1,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=1&&EXIST(LL2,BARPOS)=0,H,'',COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=2&&COUNT(LL2,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=1&&EXIST(HH2,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=2&&COUNT(HH2,BARPOS)=2,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=1&&EXIST(LL2,BARPOS)=1,H,'',COLORBLACK;
DRAWTEXT(HH2&&COUNT(HH2,BARPOS)=2&&COUNT(LL2,BARPOS)=2,H,'',COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=1&&EXIST(HH2,BARPOS)=0,L,'',VALIGN0,COLORBLACK;
DRAWTEXT(LL2&&COUNT(LL2,BARPOS)=2&&COUNT(HH2,BARPOS)=1,L,'',VALIGN0,COLORBLACK;
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)>=0,L,HH过滤&&AA&&REFX1(CC,10000)>=0,H,0),COLORRED;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)>=0,H,LL过滤&&BB&&REFX1(CC,10000)>=0,L,0),COLORRED;
DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)<0,L,HH过滤&&AA&&REFX1(CC,10000)<0,H,0),COLORGREEN;
DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)<0,H,LL过滤&&BB&&REFX1(CC,10000)<0,L,0),COLORGREEN;
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,1);
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,0);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,1);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,0);
H1:=HH过滤&&AA&&REFX1(CC,10000)>=0;
HH:=CROSS(BACKSET(ISLASTBAR,SUMBARS(H1,1)),0.5);
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 或微信号:cxh99cxh99 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)
相关文章
-
没有相关内容