最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信心爱画线主图指标公式源码

    正文概述    2024-04-13 13:20:51  

    M1:=7;M2:=21;
    获利%:WINNER(CLOSE)*100,NODRAW,COLORRED;
    参考:MA(CLOSE,M1),COLORYELLOW;
    趋势:MA(CLOSE,M2),COLORMAGENTA;
    JRH:=HHV(C,2);
    JRL:=LLV(C,2);
    MA3:=MA(CLOSE,3);
    YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
    VAR1O:=(CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2));
    VAR2O:=(REF(VAR1O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR3O:=(REF(VAR2O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR4O:=(REF(VAR3O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR5O:=(REF(VAR4O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR6O:=(REF(VAR5O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR7O:=(REF(VAR6O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR8O:=(REF(VAR7O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR9O:=(REF(VAR8O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VARAO:=(REF(VAR9O,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VARBO:=(REF(VARAO,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VARCO:=(REF(VARBO,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VARDO:=(CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2));
    VAREO:=(REF(VARDO,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VARFO:=(REF(VAREO,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR10:=(REF(VARFO,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR11:=(REF(VAR10,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR12:=(REF(VAR11,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR13:=(REF(VAR12,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR14:=(REF(VAR13,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR15:=(REF(VAR14,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR16:=(REF(VAR15,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR17:=(REF(VAR16,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR18:=(REF(VAR17,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2));
    VAR19:=((REF(VARDO OR VAREO OR VARFO OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1)) AND VAR1O);
    VAR1AO:=((REF(VAR1O OR VAR2O OR VAR3O OR VAR4O OR VAR5O OR VAR6O OR VAR7O OR VAR8O OR VAR9O OR VARAO OR VARBO OR VARCO,1)) AND VARDO);
    红色持股:=VAR1O OR VAR2O OR VAR3O OR VAR4O OR VAR5O OR VAR6O OR VAR7O OR VAR8O OR VAR9O OR VARAO OR VARBO OR VARCO,COLOR0000FF,NODRAW;
    离场A:=IF(红色持股,JRL,DRAWNULL);
    明离场价:=离场A,COLORFF99FF,NODRAW;
    今离场价:REF(离场A,1)COLOR0000FF,NODRAW;
    青色观望:=VARDO OR VAREO OR VARFO OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,COLORFFFF00,NODRAW;
    进:=IF(青色观望,JRH,DRAWNULL);
    明进场价:=进,COLOR33AACC,NODRAW;
    今进场价:REF(明进场价,1),COLORGREEN,NODRAW;
    短买:VAR19,COLOR33AACC,NODRAW;
    离场:VAR1AO,COLORFF99FF,NODRAW;
    IF(MA(CLOSE,7) =REF(MA(CLOSE,7),1),MA(CLOSE,7),DRAWNULL),COLORRED;
    IF(MA(CLOSE,21) =REF(MA(CLOSE,21),1),MA(CLOSE,21),DRAWNULL),COLORRED;
    STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;
    STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;
    A7:=C-REF(C,1);
    A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(Abs(A7),6),6);
    SHORT:=7; LONG:=19;
    RMA:=EMA(CLOSE,SHORT);
    NMA:=EMA(CLOSE,LONG);
    上升:DRAWLINE(L=LLV(L,BARSLAST(crOSS(NMA,RMA))+1)
    ,LLV(L,BARSLAST(CROSS(NMA,RMA))+1),
    H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0),COLORLIRED;
    下降:DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),
    HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1)
    ,LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0),COLOR555555;
    买进:=(LLV(A8,2)=LLV(A8,7) AND COUNT(A8 0,2) AND
    CROSS(A8,MA(A8,2))) AND REF(下降,1) REF(下降,2) AND 上升 REF(下降,1);
    趋势区:=IF((EVERY(下降 =REF(下降,1),1)),4,2);
    低买:=IF(((CROSS(趋势区,2.1))),1,0);
    高卖:=IF(((CROSS(3.9,趋势区))),1,0);
    DRAWICON(低买,上升-0.2,1);
    DRAWICON(高卖,下降+0.2,2);
    A1:=REF(H,8)=HHV(H,2*8+1);
    B1:=FILTER(A1,8);
    C1:=BACKSET(B1,8+1);
    D1:=FILTER(C1,8);{www.9m8.cn}高点}
    R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);S11:=R11 REF(R11,1);
    DRAWLINE(D1,H,S11,H,1),COLORBLUE,LINETHICK1;
    A2:=REF(L,8)=LLV(L,2*8+1);
    B2:=FILTER(A2,8);
    C2:=BACKSET(B2,8+1);
    D2:=FILTER(C2,8);{www.9m8.cn}低点}
    T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);U11:=T11 REF(T11,1);
    DRAWLINE(D2,L,U11,L,1),COLORBLUE,LINETHICK1;
    M:=INTPART(3*8/5);
    A12:=REF(H,M)=HHV(H,2*M+1);
    B12:=FILTER(A12,M);
    C12:=BACKSET(B12,M+1);
    D12:=FILTER(C12,M);{www.9m8.cn}高点}
    R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1);S112:=R112 REF(R112,1);
    DRAWLINE(D12,H,S112,H,1),COLORFFFF00,LINETHICK1;
    A22:=REF(L,M)=LLV(L,2*M+1);
    B22:=FILTER(A22,M);
    C22:=BACKSET(B22,M+1);
    D22:=FILTER(C22,M);{www.9m8.cn}低点}
    T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);U112:=T112 REF(T112,1);
    DRAWLINE(D22,L,U112,L,1),COLORFFFF00,LINETHICK1;
    ZT:=C/REF(C,1) 1.096;
    ZTBPJ:=REF(C,BARSLAST(ZT)+1)*0.98;{www.9m8.cn}涨停不破价}
    ZTBP:=BARSLAST(ZT) 30 AND (LLV(C,BARSLAST(ZT)) =ZTBPJ OR
    LLV(C,BARSLAST(ZT))=ZTBPJ);{www.9m8.cn}涨停不破}

    上面源码未完......

    下载附件里的源码.......

    通达信心爱画线主图指标公式源码

    通达信心爱画线主图指标公式源码

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信心爱画线主图指标公式源码 加入收藏