最新更新 - 网站地图 -
您的当前位置:首页 > 股票公式 > 公式教程 > 麻烦改个股在分割线顶点上做个选股指标

麻烦改个股在分割线顶点上做个选股指标

来源:网络 点击: 时间:2023-01-06 05:22:46

麻烦改个股在分割线顶点上做个选股指标

{ 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 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;

老K股票学习网解答:


MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA60:=MA(CLOSE,60);
JXX:=BARSLASTCOUNT(C 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);

    Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top