炒股技术指标之自动显示黄金柱及精准线的主图公式
发布时间:2019-7-23 10:36阅读:4613
自动显示黄金柱及精准线的主图公式
{均线系统}
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA60:MA(CLOSE,60);
{通用条件}
LASTK:=(REF(ISLASTBAR,2)=0);
上涨:=CLOSE>REF(CLOSE,1);
未跌破:=REF(CLOSE,1)>LOW ANDREF(CLOSE,2)>LOW ANDREF(CLOSE,3)>LOW;
缩量:=VOL>0.35*(REF(VOL,1) REF(VOL,2) REF(VOL,3)) ANDVOL>REF(VOL,1);{1.05/3,5%}
逐级缩量:=VOL>REF(VOL,1) ANDREF(VOL,1)>REF(VOL,2) AND
REF(VOL,2)>REF(VOL,3);
逐级价升:=CLOSE
REF(CLOSE,2)
{倍量柱}
倍量柱:=VOL>=(REF(VOL,1)REF(VOL,1))*0.9,LINETHICK0,COLORWHITE;
{高量柱}
高量柱:=VOL>0.3*(REF(SUM(VOL,3),1) REF(SUM(VOL,3),3))AND
VOL>REF(VOL,1) ANDVOL>REF(VOL,1),LINETHICK0,COLORWHITE;{1.8/6,1.8倍}
{平量柱}
平量柱:=VOL>REF(VOL,1)*0.97 AND VOL
VOL>=2*REF(VOL,1),LINETHICK0,COLORWHITE;
{梯量柱}
梯量柱:=VOL>REF(VOL,1) ANDREF(VOL,1)>REF(VOL,2) AND
CLOSE>REF(CLOSE,1) ANDREF(CLOSE,1)>REF(CLOSE,2),LINETHICK0,COLORWHITE;{虽然是梯量柱,但也不能太小}
{将军柱}
将军柱:=LASTK AND 上涨 AND 未跌破 AND (倍量柱 OR 高量柱 OR 平量柱 OR梯量柱),LINETHICK0,COLORYELLOW;
{黄金柱}
黄金柱:=将军柱 AND缩量,LINETHICK0,COLORYELLOW;
{标准黄金柱}
标准黄金柱:=黄金柱 AND 逐级缩量 AND逐级价升,LINETHICK0,COLORRED;
{输出}
DRAWICON(黄金柱 AND 标准黄金柱=0 ANDBARSLAST(REF(黄金柱,1))>1,LOW,8),COLORRED;
DRAWICON(标准黄金柱,LOW,4),COLORRED;
DRAWICON(将军柱 AND BARSLAST(REF(将军柱,1))>1 ANDBARSLAST(黄金柱)>1,LOW,10),COLORRED;
MA135:=MA(VOL,135);
TJ1:=(VOL=HHV(VOL,10) AND VOL>1.7*REF(VOL,1) ANDC>=REF(C,1) AND C>=O ANDVOL<=MA135*3.5);
LJL:=FILTER(TJ1,3);
TJ3:=IF(BARSLAST(LJL)=1 ANDCLOSE>REF(LOW,3),1,0);
ST:=TJ3=1;
CL:=FILTER(ST,3);
STICKLINE(C,REF(L,BARSLAST(CL)),REF(L,BARSLAST(CL)),0.8,0),COLORYELLOW;
STICKLINE(CLOSE,REF(L,BARSLAST(LJL)),REF(L,BARSLAST(LJL)),0.8,0),COLORCYAN;
STICKLINE(LJL,OPEN,CLOSE,0.8,0),COLORYELLOW;
DRAWTEXT(LJL,L*0.99,'支撑'),COLORF00FF0;
GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
BAIJIN1:=BARSLAST(CROSS(30,GJTJ1))<2 ANDBARSLAST(CROSS(GJTJ1,50))<2;
BAIJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 ANDGJTJ1>GJTJ4;
BAIJIN3:=GJTJ1>60 ANDGJTJ4>70;
DRAWTEXT(BAIJIN1 AND BAIJIN2 ANDBAIJIN3,L-0.02,'白金');
HUANGJIN1:=BARSLAST(CROSS(50,GJTJ1))<3 ANDBARSLAST(CROSS(GJTJ1,50))<3;
HUANGJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 ANDGJTJ1>GJTJ4;
DRAWTEXT(HUANGJIN1 ANDHUANGJIN2,L-0.03,'黄金');
XG:=BARSLAST(CROSS(GJTJ4,GJTJ1))<5 ANDGJTJ1>GJTJ4;
DRAWTEXT(COUNT(XG,3)=1 AND XG ANDC>MA(C,20),L-0.02,'暴涨启动'),COLORRED;
ZHENCANG1:=BARSLAST(CROSS(GJTJ4,GJTJ1))>3 ANDBARSLAST(CROSS(GJTJ1,GJTJ4))<3;
ZHENCANG2:=BARSLAST(CROSS(GJTJ4,GJTJ2));
ZHENCANG3:=GJTJ3
ZHENCANG4:=BARSLAST(CROSS(GJTJ4,GJTJ3))>3 ANDBARSLAST(CROSS(GJTJ1,GJTJ4))<3;
ZHENCANG5:=GJTJ2
ZCB1:=ZHENCANG1>0 AND REF(ZHENCANG1,1)=0 ANDREF(ZHENCANG1,2)>0;
DRAWTEXT(ZHENCANG1 AND ZHENCANG2 AND ZHENCANG3 AND ZHENCANG4AND
ZHENCANG5,L-0.05,'震仓启点'),COLORYELLOW;
AA:=BARSLAST(CROSS(97,GJTJ1))<=1 ANDBARSLAST(CROSS(GJTJ1,85))<=1;
BB:=BARSLAST(CROSS(97,GJTJ2))<=1 ANDBARSLAST(CROSS(GJTJ2,85))<=1;
AA1:=AA ANDBB;
AAA:=BARSLAST(CROSS(97,GJTJ1))<=2 ANDBARSLAST(CROSS(GJTJ1,85))<=1;
BAA:=BARSLAST(CROSS(97,GJTJ2))<=2 ANDBARSLAST(CROSS(GJTJ2,85))<=1;
AA2:=AA AND BB;
AAAA:=BARSLAST(CROSS(97,GJTJ1))<=3 ANDBARSLAST(CROSS(GJTJ1,85))<=1;
BAAA:=BARSLAST(CROSS(97,GJTJ2))<=3 ANDBARSLAST(CROSS(GJTJ2,85))<=1;
AA3:=AAAA AND BAAA;
BB1:=REF(AA1,1);
BB2:=REF(AA2,1);
BB3:=REF(AA3,1);
DD1:=GJTJ1=100 AND GJTJ2=100 AND AA1;
DD2:=GJTJ1=100 AND GJTJ2=100 AND AA2;
DD3:=GJTJ1=100 AND GJTJ2=100 AND AA3;
DRAWTEXT(DD1 OR DD2 ORDD3,L-0.02,'短线追涨'),COLORBROWN;
AW:=BARSLAST(CROSS(95,GJTJ1))<=2;
BW:=BARSLAST(CROSS(95,GJTJ2))<=2;
EW:= GJTJ4
FW:=GJTJ2>50 ANDGJTJ3>50;
GW:=GJTJ1=100 ANDGJTJ2=100;
TXW:=COUNT(GW,2)=1;
DRAWTEXT(AW AND BW AND EW AND FW ANDTXW,L-0.03,'起涨首日'),COLORBLUE;
AQ:=GJTJ3=100;
BQ:=GJTJ4<90;
DRAWTEXT(COUNT(AQ,2) = 2 ANDBQ,L-0.02,'波启前兆'),COLORCYAN;
AA8:=AMOUNT/V;
BB8:=L
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD8:=L
EE1:=V
老鼠仓:=BB1 AND CC1 AND DD1 ANDEE1,LINETHICK0;
DRAWTEXT(老鼠仓,(LOW* 0.99),'老鼠仓'),COLORLIGREEN;
咨询领取更多炒股技术资料。更有机会参与高效量化交易系统, 我司是上市证券公司,业务齐全,为每一位客户提供优质服务。
温馨提示:投资有风险,选择需谨慎。