缠论分型主图,中枢主图
来源:股典钟量化炒股机器人 | 作者:股典钟量化炒股机器人 | 发布时间: 2024-02-19 | 261 次浏览 | 分享到:
帮你画线分段省下不少功夫

时间窗口5:=FILTER(IF(HHVBARS(HIGH,55),0,30),55),COLOR99FF99;

DRAWTEXT(时间窗口5,HIGH*0.99,'55');

时间窗口6:=FILTER(IF(LLVBARS(LOW,55),0,30),55),COLORDD00FF;

DRAWTEXT(时间窗口6,LOW*0.99,'55');

时间窗口7:=FILTER(IF(HHVBARS(HIGH,89),0,40),89),COLORDDFFDD;



缠论中枢源码:

N:=(1,100,8);

KK:=(0,2,0);

TYP := (HIGH + LOW + CLOSE)/3;

CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));

CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));

CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));

CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));

CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));

CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;

AAAB:=(3*C+H+L+O)/6;

VVAR1:=(8*AAAB+7*REF(AAAB,1)+6*REF(AAAB,2)+5*REF(AAAB,3)+4*REF(AAAB,4)+3*REF(AAAB,5)+2*REF(AAAB,6)+REF(AAAB,8))/36;

VVAR6:=(LLV(VVAR1,2)+LLV(VVAR1,4)+LLV(VVAR1,6))/3;

短线:IF(KK=0, VVAR1, DRAWNULL),COLORWHITE;

中线:IF(KK=0,VVAR6, DRAWNULL),COLORYELLOW;

DRAWBAND(短线,RGB(200,10,10),中线,RGB(10,200,10));

DRAWKLINE(H,O,L,C);

下跌:IF(KK=0 AND VVAR1=VVAR6,VVAR6, DRAWNULL),COLORGREEN;

中:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;

上轨:IF(KK=1,中+3*STD(中,10),DRAWNULL),COLOR000088,LINETHICK1;