经典高抛低吸 双色均线持股【指标公式】(含选股)第一部分 副图公式 手机/电脑
P1:=10;P2:=20;
R1:=MA(CLOSE,P1);
C1:=C>=R1;C2:=C
CHA:=C1>=C2;CHB:=C2>C1;
STICKLINE(CHA,C,O,3,0),COLORRED;
STICKLINE(CHA,H,L,0,0),COLORRED;
STICKLINE(CHB,C,O,3,0),COLOR00FF00;
STICKLINE(CHB,H,L,0,0),COLOR00FF00;
STICKLINE(CHA,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CHA,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CHA,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CHA,CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE(CHB,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(CHB,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(CHB,CLOSE,OPEN,1.5,0),COLORFFBB00 ;
STICKLINE(CHB,CLOSE,OPEN,0.5,0),COLORCYAN;
CHMA:R1,COLOR00FF00,LINETHICK2;
IF(CHMA>=REF(CHMA,1),CHMA,DRAWNULL),COLORRED,,LINETHICK2;
IF(CHMA
CHMB:MA(CLOSE,P2),COLOR00FF00,LINETHICK2;
IF(CHMB>=REF(CHMB,1),CHMB,DRAWNULL),COLORMAGENTA,LINETHICK2;
IF(CHMB
DRAWICON(CHMA>=REF(CHMA,1) AND CROSS(CHMA,CHMB),CHMA*0.98,1);
DRAWICON(CROSS(CHMB,CHMA),CHMB*1.02,2);
CHP2:=(2*CLOSE+HIGH+LOW)/4;
CHP3:=IF(YEAR>=2099 AND MONTH>2,0,1);
CHP4:=LLV(LOW,5);
CHP5:=HHV(HIGH,4);
CHP6:=EMA((CHP2-CHP4)/(CHP5-CHP4)*100,4)*CHP3;
CHP7:=EMA(0.667*REF(CHP6,1)+0.333* CHP6,2)*CHP3;
DRAWTEXT(CROSS(CHP6, CHP7) AND CHP6<30,L-0.05,'←低吸'),COLOR00FFFF;
DRAWTEXT(CROSS(CHP7, CHP6) AND CHP6>70,H+0.05,'←高抛'),COLOR00FFFF;
DRAWICON(CROSS(CHP6, CHP7) AND CHP6<30,L-0.05,25);
DRAWICON(CROSS(CHP7, CHP6) AND CHP6>70,H+0.05,27);
CHAA:= CHMA>=REF(CHMA,1);{C>=CHMA;}
CHBB:= CHMA
CHDD:=CHMB>=REF(CHMB,1);
CHEE:=CHMB
CHTT:=IF(ISLASTBAR,240/FROMOPEN,1);
CHNN:=120;
HH:=HHV(V*CHTT,CHNN);
LL:=LLV(V,CHNN);
高:=CONST(HH);
低:=CONST(LL);
高2:=CONST(HHV(H,CHNN));
低2:=CONST(LLV(L,CHNN));
PP:=IF((高2*0.9-(高2-低2)*0.5)>CONST(LLV(L,20)),0.9,IF((高2*0.9-(高2-低2)*0.5)>CONST(LLV(L,50)),0.7,0.6)),NODRAW;
RCC1:=高2*0.9-(高2-低2)*PP;
低3:=MIN(RCC1,低2);
CHA1:=低3;
STICKLINE(CHAA,CHA1-0.000*CHA1,CHA1-0.040*CHA1,4,0),COLOR0000FF;
STICKLINE(CHBB,CHA1-0.000*CHA1,CHA1-0.040*CHA1,4,1),COLOR686868;
STICKLINE(CHDD,CHA1-0.050*CHA1,CHA1-0.090*CHA1,4,0),COLORFF00FF;
STICKLINE(CHEE,CHA1-0.050*CHA1,CHA1-0.090*CHA1,4,1),COLOR686868;
DRAWTEXT_FIX(1,0.1,0.84,0,'★★ 红色--均线A持股★★粉色--均线B持股★★'),COLORCYAN;
第二部分 选股公式
{选股公式一:低吸}
P1:=10;P2:=20;
R1:=MA(CLOSE,P1);
C1:=C>=R1;C2:=C
CHA:=C1>=C2;CHB:=C2>C1;
CHMA:=R1,COLOR00FF00,LINETHICK2;
CHMB:=MA(CLOSE,P2),COLOR00FF00,LINETHICK2;
CHP2:=(2*CLOSE+HIGH+LOW)/4;
CHP3:=IF(YEAR>=2099 AND MONTH>2,0,1);
CHP4:=LLV(LOW,5);
CHP5:=HHV(HIGH,4);
CHP6:=EMA((CHP2-CHP4)/(CHP5-CHP4)*100,4)*CHP3;
CHP7:=EMA(0.667*REF(CHP6,1)+0.333* CHP6,2)*CHP3;
低吸:CROSS(CHP6, CHP7) AND CHP6<30;
{选股公式二:红箭头图标}
P1:=10;P2:=20;
R1:=MA(CLOSE,P1);
C1:=C>=R1;C2:=C
CHA:=C1>=C2;CHB:=C2>C1;
CHMA:=R1,COLOR00FF00,LINETHICK2;
CHMB:=MA(CLOSE,P2),COLOR00FF00,LINETHICK2;
CHAA:= CHMA>=REF(CHMA,1);
CHBB:= CHMA
CHDD:=CHMB>=REF(CHMB,1);
红箭头图标:CHMA>=REF(CHMA,1) AND CROSS(CHMA,CHMB);
|