麻烦改个股在分割线顶点上做个选股指标
麻烦改个股在分割线顶点上做个选股指标
{ P1 0 500 5,
P2 0 500 10,
P3 0 500 20,
P4 0 500 30,
P5 0 500 60,}
MA5: MA(CLOSE,P1);
MA10: MA(CLOSE,P2);
MA20: MA(CLOSE,P3);
MA30: MA(CLOSE,P4);
MA60: MA(CLOSE,P5);
STICKLINE(C>REF(C,1)*1.095,C,O,2,0),COLORYELLOW;
JXX:=BARSLASTCOUNT(C<MA20);
JXX1:=BACKSET((JXX>=4)*JXX,JXX);
JXS:=BARSLASTCOUNT(C>MA20);
JXS1:=BACKSET((JXS>=4)*JXS,JXS);
KGC:=BARSLASTCOUNT(NOT(JXX1 OR JXS1));
JXL:=BARSLASTCOUNT(REF(JXX1>0,KGC));
JXH:=BARSLASTCOUNT(REF(JXS1>0,KGC));
XWZ:=FILTERX(LLV(L,JXL)=L,JXL);
SWZ:=FILTERX(HHV(H,JXH)=H,JXH);
{DRAWLINE(XWZ,L,SWZ,H,0),COLOR00FFFF};
高:=REF(H,BARSLAST(SWZ));
低:=REF(L,BARSLAST(XWZ));{这种情况应对目前在20下方}
BB:=BARSLAST(JXL=1);{上次JXL等于1距今天数}
顶点2:=REF(高,BARSLAST(JXL)),COLORYELLOW;
低点2:=REF(低,BB),COLORYELLOW;{上次等于1对应的低价}
H23:=((顶点2-低点2)*0.236+低点2);
H38:=((顶点2-低点2)*0.382+低点2);
H中:=((顶点2-低点2)*0.5+低点2);
H61:=((顶点2-低点2)*0.618+低点2);
H80:=((顶点2-低点2)*0.809+低点2);
H138:=((顶点2-低点2)*1.382+低点2);
顶点:REFDATE(顶点2,DATE),COLORRED LINETHICK1;
低点:REFDATE(低点2,DATE),COLORGREEN LINETHICK1;
%23.6:=REFDATE(H23,DATE),COLORYELLOW,DOTLINE;
%38.2:=REFDATE(H38,DATE),COLORYELLOW,DOTLINE;
%50:=REFDATE(H中,DATE),COLORYELLOW,DOTLINE;
%61.8:REFDATE(H61,DATE),COLORYELLOW,DOTLINE;
%80.9:=REFDATE(H80,DATE),COLORYELLOW,DOTLINE;
%138.2:=REFDATE(H138,DATE),COLORYELLOW,DOTLINE;
DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORWHITE;
DRAWTEXT(ISLASTBAR,%23.6,'%23.6'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,%38.2,'%38.2'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%50,'%50'),COLORRED;
DRAWTEXT(ISLASTBAR,%61.8,'%61.8'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%80.9,'%80.9'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,低点,'低点'),COLORWHITE;
DRAWTEXT(ISLASTBAR,%138.2,'%138.2'),COLORMAGENTA;
公式网www.gpxiazai.com解答:
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA60:=MA(CLOSE,60);
JXX:=BARSLASTCOUNT(C<MA20);
JXX1:=BACKSET((JXX>=4)*JXX,JXX);
JXS:=BARSLASTCOUNT(C>MA20);
JXS1:=BACKSET((JXS>=4)*JXS,JXS);
KGC:=BARSLASTCOUNT(NOT(JXX1 OR JXS1));
JXL:=BARSLASTCOUNT(REF(JXX1>0,KGC));
JXH:=BARSLASTCOUNT(REF(JXS1>0,KGC));
XWZ:=FILTERX(LLV(L,JXL)=L,JXL);
SWZ:=FILTERX(HHV(H,JXH)=H,JXH);
高:=REF(H,BARSLAST(SWZ));
顶点2:=REF(高,BARSLAST(JXL));
XG:CROSS(C,顶点2);
- 上一篇公式:做个预警公式 当出现买点的时候能够预警
- 下一篇公式:倚天侥选股