公式名称:[六脉神剑],我自用的主图,用于研究股票的整体趋势,支撑与压力。贴图有详细用法。
=======================================
主图/副图 | 含未来否 | 含参数否 | 可参考性
主/副 | 是/否 | 是/否 | 低/中/高
=======================================
该公式包含未来函数: BACKSET
用来画直线的,必须用到未来函数。不给出任何买卖提示,用来看趋势的。
{参数: 上:2 15 3 下:2 15 4}
M10:=EMA(C,10);
STICKLINE(C>M10,H,L-L/1000,0,0),COLOR228811;
STICKLINE(C>M10,C,O,3,1),COLOR228811;
STICKLINE(C<M10,H,L,0,0),COLORWHITE;
STICKLINE(C<M10,C,O,3,1),COLORWHITE;
Q1:=FILTER(BACKSET(REF(H,10)=HHV(H,上*10+1),10+1),10) AND H=HHV(H,10+1);
Q2:=BARSLAST(Q1);
Q3:=IF(Q2,REF(IF(Q1,CURRBARSCOUNT,0),Q2),IF(Q1,CURRBARSCOUNT,0));
QA:=CONST(Q3);
QB:=CONST(REF(Q3,Q2+1));
【压力:DRAWLINE(CURRBARSCOUNT=QB,H,CURRBARSCOUNT=QA,H,1),COLOR996699,LINETHICK2;
】【看高点:DRAWLINE(CURRBARSCOUNT=QB,H,ISLASTBAR,REF(H,QB-1),1),COLOR0099FF,POINTDOT;
】【攀高点:DRAWLINE(CURRBARSCOUNT=QA,H,ISLASTBAR,REF(H,QA-1),1),COLORDD99DD,POINTDOT;
DRAWTEXT(ISLASTBAR,】【看高点*1.008,'—看高点'),COLOR0099FF;
DRAWTEXT(ISLASTBAR,】【攀高点*1.008,'—攀高点'),COLORDD99DD;
QM:=INTPART(下*8/5);
QC1:=FILTER(BACKSET(REF(L,8)=LLV(L,2*8+1),8+1),8) AND L=LLV(L,8+1);
QD1:=BARSLAST(QC1);
QF1:=IF(QD1,REF(L,QD1),L);
QG1:=IF(QD1,REF(IF(QC1,CURRBARSCOUNT,0),QD1),IF(QC1,CURRBARSCOUNT,0));
QH1:=CONST(QG1);
QM1:=REF(QG1,QD1+1);
QT1:=REF(L,QM)=LLV(L,2*QM+1);
QY1:=FILTER(QT1,QM);
QI1:=FILTER(BACKSET(QY1,QM+1),QM);
QP1:=BACKSET(ISLASTBAR,BARSLAST(QI1)+1);
QJ1:=QP1>REF(QP1,1);
】【支撑:DRAWLINE(QI1,L,QJ1,L,1),COLOR999999,LINETHICK2;
】【着陆点:DRAWLINE(CURRBARSCOUNT=QH1,L,ISLASTBAR,REF(L,QH1-1),1),COLORBBBBBB,POINTDOT;
】【熄火点:DRAWLINE(CURRBARSCOUNT=CONST(QM1),L,ISLASTBAR,REF(L,CONST(QM1)-1),1),COLOR777777,POINTDOT;
DRAWTEXT(ISLASTBAR,】【着陆点*1.007,'—着陆点'),COLORBBBBBB;
DRAWTEXT(ISLASTBAR,】【熄火点*1.007,'—熄火点'),COLOR777777;
】【125:MA(C,125),COLORGREEN;
】【29:MA(C,29),COLORWHITE;
{均价线:SUM(C*V,240)/SUM(V,240),COLORGREEN,LINETHICK2;}
DRAWTEXT(ISLASTBAR,H*1.1,'');
|