135所有战法公式全编写,注释详细
RYHB3:=EMA13<REF(EMA13,1) OR ABS(1-EMA13/REF(EMA13,1))<0.01 AND (EMA13<EMA34 OR EMA13<EMA55);
RYHB4:=REF(L,1)<=LLV(REF(L,1),10);
RYHB:=RYHB1 AND RYHB2 AND RYHB3 AND RYHB4;
DRAWTEXT(RYHB ,LOW,'日月合璧'),COLORYELLOW;
{投石问路}
TSWL1:=CROSS(EMA13,EMA34) AND EMA13<EMA55;
DRAWTEXT(TSWL1,L-0.1,'投石问路'),COLOR0044FF;
{分道扬镳}
FDYB:=CROSS(EMA34,EMA13) AND EMA34>EMA55;
DRAWTEXT(FDYB,L-0.1,'分道扬镳'),COLOR0044FF;
{三军集结}
SJJJ3:=REF(EMA55,1)>REF(EMA13,1);
SJJJ4:=ABS(1-(MAX(MAX(EMA34,EMA55),EMA13)/MIN(MIN(EMA13,EMA34),EMA55)))<0.005;
SJJJ:=SJJJ3 AND SJJJ4;
DRAWTEXT(SJJJ AND FILTER(SJJJ,5),L-0.1,'三军集结'),COLOR0044FF;
{突出重围}
TCCW1:=REF(EMA55,1)<REF(EMA13,1);
TCCW2:=EMA13<LLV(REF(EMA13,1),5) AND ABS(1-(MAX(MAX(EMA34,EMA55),EMA13)/MIN(MIN(EMA13,EMA34),EMA55)))<0.008;
TCCW:=TCCW1 AND TCCW2;
DRAWTEXT(TCCW AND FILTER(TCCW,5),H+0.01,'突出重围'),COLORF00FF0;
{明修栈道}
MXZD1:=C/O>1.07;
MXZD2:=EMA13>HHV(REF(EMA13,1),5) AND V>HHV(REF(V,1),10) AND V/MA(REF(V,1),5)>2;
MXZD:=MXZD1 AND MXZD2;
DRAWTEXT(MXZD,H+0.01,'明修栈道'),COLORF00FF0;
{暗度陈仓}
ADCC1:=O/C>1.05 AND EMA13/EMA55<1.1 AND EMA13>MA(EMA13,5);
ADCC2:=O/REF(C,1)<1.03;{V<HHV(REF(V,1),5) AND V/MA(REF(V,1),5)<2};
ADCC:=ADCC1 AND ADCC2;
DRAWTEXT(ADCC,(C+O)/2,'暗度陈仓'),COLOR00C5FF;
{破镜重圆}
PJCY1:=REF(O,1)/REF(C,1)>1.02;
PJCY2:=O<=REF(C,1) AND C>=REF(O,1);
PJCY3:=(ABS(1-REF(C,1)/EMA55)<0.05 OR ABS(1-C/EMA55)<0.05 OR ABS(1-MA(C,2)/EMA55)<0.05);
PJCY4:=EMA13>EMA55 OR EMA13>MA(EMA13,5);
PJCY:=PJCY1 AND PJCY2 AND PJCY3 AND PJCY4;
DRAWTEXT(PJCY,LOW,'破镜重圆'),COLORYELLOW;
{一石二鸟}
YSEN1:=REF(C,2)>REF(O,2) AND REF(C,1)<REF(O,1) AND C<O;
YSEN2:=REF(C,2)>EMA55 AND EMA13>EMA55 AND EMA13>=MA(EMA13,5);
YSEN3:=REF(V,2)>REF(V,1) AND REF(V,2)>V;
YSEN:=YSEN1 AND YSEN2 AND YSEN3;
DRAWTEXT(YSEN,H+0.01,'一石二鸟'),COLORBLUE;
{拖泥带水}
TNDS1:=O/REF(C,1)>1.05 AND MIN(C,O)/L>1.03;
TNDS2:=C/MAX(EMA13,EMA55)>1.03 AND C>REF(C,1);
TNDS:=TNDS1 AND TNDS2;
DRAWTEXT(TNDS,(O+C)/2,'拖泥带水'),COLORF00FF0;
{金蝉脱壳}
JCTQ1:=C<O AND (EMA13/EMA55>1.1 OR (C/MIN(EMA13,EMA55)>1.1)) AND EMA13>MA(EMA13,5);
JCTQ2:=REF(O,1)>=REF(C,2) AND REF(C,1)>REF(O,1) AND O<=REF(C,1) AND C>REF(O,1);
JCTQ:=JCTQ1 AND JCTQ2;
DRAWTEXT(JCTQ,(O+C)/2,'金蝉脱壳'),COLORF00FF0;
{一箭穿心}
YJCX:=CROSS(EMA55,EMA13);
DRAWTEXT(YJCX,L-0.1,'一箭穿心'),COLOR0044FF;
{步步高}
BBG1:=C>=REF(C,1) AND REF(C,1)>=REF(C,2);{3日内收盘价都比前日收盘价高}
BBG2:=V>=REF(V,1) AND REF(V,1)>=REF(V,2);{3日内量都比前日量高}
BBG3:=COUNT(C>=O,3)=3;
BBG:=BBG1 AND BBG2 AND BBG3;
DRAWTEXT(BBG AND FILTER(BBG,3),(C+O)/2,'步步高'),COLORFF00FF;
{双飞燕}
SFY1:=EMA13>EMA34 AND EMA34>EMA55;
SFY2:=REF(O,1)>=REF(C,2) AND O>=REF(C,1) AND REF(C,2)>=REF(O,2);
SFY3:=COUNT(C>O AND C/O<1.02,2)=2 OR COUNT(C<O AND O/C<1.02,2)=2;
SFY4:= V<REF(V,1);
SFY:=SFY1 AND SFY2 AND SFY3 AND SFY4;
DRAWTEXT(SFY AND FILTER(SFY,2),L,'双飞燕'),COLORYELLOW;
{三剑客}
SJK1:=EMA13>EMA34 AND EMA34>EMA55;
SJK2:=COUNT(C<=O AND O/C<1.03,3)=3 AND COUNT(ABS(1-REF(C,1)/C)<1.03,2)=2;
SJK:=SJK1 AND SJK2;
DRAWTEXT(SJK AND FILTER(SJK,3),L,'三剑客'),COLORYELLOW;
{四星望月}
SXWY1:=COUNT(C>=O AND C/O<1.03,4)=4;
SXWY2:=(ABS(EMA13-EMA34)+ABS(EMA34-EMA55))/C<0.1;{主均线相距很近或基本持平}
SXWY3:=EMA13<EMA55;
SXWY:=SXWY1 AND SXWY2 AND SXWY3;
DRAWTEXT(SXWY AND FILTER(SXWY,5),H,'四星望月'),COLOR00C5FF;
{星星点灯}
XXDD1:=ABS(1-C/O)*100<=2.5 AND H/MAX(C,O)>1.03 AND REF(C,1)/REF(O,1)>1.05;
XXDD2:=O>=REF(C,1) AND ABS(1-REF(EMA13,1)/EMA55)<0.1};
XXDD:=XXDD1 AND XXDD2;
DRAWTEXT(XXDD,(O+C)/2,'星星点灯'),COLORGREEN;
{过河拆桥}
GHCQ1:=C<O AND O/C>=1.04;
GHCQ2:=O>EMA13 AND C<EMA13;
GHCQ3:=EMA13/EMA55>1.1 AND ABS(1-EMA13/MA(EMA13,3))<0.02;
GHCQ:=GHCQ1 AND GHCQ2 AND GHCQ3;
DRAWTEXT(GHCQ,(O+C)/2,'过河拆桥'),COLORF00FF0;
{狗急跳墙}
GJTQ1:=O/REF(C,1)>1.02 AND L>REF(C,1);
GJTQ2:=V>MA(V,5);
GJTQ3:=EMA13/EMA55>1.1;
GJTQ:=GJTQ1 AND GJTQ2 AND GJTQ3;
DRAWTEXT(GJTQ,(O+C)/2,'狗急跳墙'),COLORF00FF0;
{双蹄并进}
STBJ1:=CROSS(DMI.PDI,DMI.MDI);
STBJ2:=ABS(1-DMI.ADX/DMI.ADXR)<0.1;
STBJ:=STBJ1 AND STBJ2;
DRAWTEXT(STBJ,(O+C)/2,'双蹄并进'),COLORGREEN;
{一剑封喉}
YJFH1:=REF(C,1)>=REF(O,1);
YJFH2:=H/MAX(C,O)>=1.035 ;
YJFH3:=V/MA(REF(V,1),11)>3 AND EMA13/EMA55>1.05;
YJFH:=YJFH1 AND YJFH2 AND YJFH3;
DRAWTEXT(YJFH,(H+L)/2,'一剑封喉'),COLORF00FF0;
{小鸟依人}
XNYR1:=REF(C,1)/REF(O,1)>1.05;
XNYR2:=O<=REF(C,1) AND ABS(1-C/O)<0.02;
- 上一篇公式:通达信决策波段指标副图公式
- 下一篇公式:通达信短中期操盘副图预警源码