在指标中标记多空

    菜鸟 发表于 2020-06-09 22:02 ・915次浏览 1条跟帖 赢顺 wh6 回复

    短顶:EMA(H,25),COLORGREEN;
    短底:EMA(L,25),COLORGREEN;
    DRAWCOLORLINE(C>短顶,短顶,COLORRED,COLORGREEN),LINETHICK3;
    DRAWCOLORLINE(C>短底,短底,COLORRED,COLORGREEN),LINETHICK3;
    STICKLINE1(C>短顶,短顶,短底,2,0),COLORYELLOW;
    STICKLINE1(C<短底,短顶,短底,2,0),COLORGREEN;
    A1:=C>REF(C,4);
    A2:=C<REF(C,4);
    T1:=A2 AND REF(A1,1);
    T2:=A2 AND REF(T1,1);
    T3:=A2 AND REF(T2,1);
    T4:=A2 AND REF(T3,1);
    T5:=A2 AND REF(T4,1);
    T6:=A2 AND REF(T5,1);
    T7:=A2 AND REF(T6,1);
    T8:=A2 AND REF(T7,1);
    T9:=A2 AND REF(T8,1);
    T10:=A2 AND REF(T9,1);
    长顶:EMA(H,90),COLORBLUE;
    长底:EMA(L,90),COLORBLUE;
    DRAWCOLORLINE(C>长顶,长顶,COLORMAGENTA,COLORBLUE);
    DRAWCOLORLINE(C>长底,长底,COLORMAGENTA,COLORBLUE);
    
    STICKLINE1(C>长顶,长顶,长底,0.01,1),COLORMAGENTA;
    STICKLINE1(C<长底,长顶,长底,0.01,1),COLORBLUE;
    B1:=C<REF(C,4);
    B2:=C>REF(C,4);
    D1:=B2 AND REF(B1,1);
    DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:=EMA(DIF,9);
    MACD:=2*(DIF-DEA);
    D2:=B2 AND REF(D1,1);
    D3:=B2 AND REF(D2,1);
    D4:=B2 AND REF(D3,1);
    D5:=B2 AND REF(D4,1);
    D6:=B2 AND REF(D5,1);
    D7:=B2 AND REF(D6,1);
    D8:=B2 AND REF(D7,1);
    D9:=B2 AND REF(D8,1);
    D10:=B2 AND REF(D9,1);
    AAA:=(2*C+H+L+2*O)/6;
    VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
    VAR2:=(HHV(VAR1,2)+HHV(VAR1,4)+HHV(VAR1,8))/3;
    VAR3:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,8))/3;
    VAR4:=(HHV(VAR2,2)+HHV(VAR2,4)+HHV(VAR2,8))/3;
    
    
    短空:=REF(C,1)>REF(短底,1) AND C<短底;
    短多:=REF(C,1)<REF(短顶,1) AND C>短顶;
    短空1:=短空 AND COUNT(短空,BARSLAST(短多))=1;
    短多1:=短多 AND COUNT(短多,BARSLAST(短空))=1;
    长空:=REF(C,1)>REF(长底,1) AND C<长底;
    长多:=REF(C,1)<REF(长顶,1) AND C>长顶;
    长空1:=长空 AND COUNT(长空,BARSLAST(长多))=1;
    长多1:=长多 AND COUNT(长多,BARSLAST(长空))=1;
    
    
    VAR5:=(LLV(VAR3,2)+LLV(VAR3,4)+LLV(VAR3,8))/3;
    VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,8))/3;
    AAE:= WINNER(CLOSE+CLOSE*15/100)*100;
    BBE:= WINNER(CLOSE+CLOSE*0/100)*100;
    CCE:= AAE-BBE;
    DDE:= (WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;
    EEE:= CCE<3 AND DDE<0.5 AND OPEN>LOW;
    AE1:= GETPRICE('LOW');
    AE2:= IF(LOW>AE1,0,IF(HIGH<AE1,1,(AE1-LOW+0.01)/(HIGH-LOW+0.01)));
    AE3:= VOL/WINNER(LOW);
    AE4:= REF(HHV(CLOSE,120),1);
    DRAWKLINE1(H,O,L,C);
    DRAWTEXT(短空1,L*1.02,'短空1'),COLORMAGENTA;
    DRAWTEXT(短多1,L*0.98,'短多1'),COLORMAGENTA;
    DRAWTEXT(长多1,L*0.98,'长多1'),COLORMAGENTA;
    DRAWTEXT(长空1,L*0.98,'长空1'),COLORMAGENTA;
    AE5:= REF(LLV(CLOSE,120),1);
    AE6:= 100*(CLOSE-AE5)/(AE4-AE5);
    AE7:= AE2>0 OR AE2=1;
    AE8:= AE7 AND AE3/REF(AE3,3)>=3 AND AE6<80;
    AE9:= REF(AE8,1) OR REF(AE8,2) OR REF(AE8,3) OR REF(AE8,4);
    AE10:= AE8 AND AE9;
    AE11:= IF(FILTER(AE8,3),5,0);
    AE12:= FILTER(IF(FILTER(AE10,3) OR EEE,10,0),3);
    ZT_1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1);
    ZT_2:=ZT_1>=0.099 AND CLOSE=HIGH AND LOW<>HIGH;
    STICKLINE1(ZT_2,OPEN,CLOSE,2.4,0),COLORYELLOW;

    autojiaoyi.com 沙发

    参考:
    
    短顶:EMA(H,25),COLORGREEN;
    短底:EMA(L,25),COLORGREEN;
    DRAWCOLORLINE(C>短顶,短顶,COLORRED,COLORGREEN),LINETHICK3;
    DRAWCOLORLINE(C>短底,短底,COLORRED,COLORGREEN),LINETHICK3;
    STICKLINE1(C>短顶,短顶,短底,2,0),COLORYELLOW;
    STICKLINE1(C<短底,短顶,短底,2,0),COLORGREEN;
    DRAWTEXT( COUNT(C>短顶,BARSLAST(C<短底))=1&&C>短顶,短底,'多'),FONTSIZE25,VALIGN0;
    DRAWTEXT( COUNT(C<短底,BARSLAST(C>短顶))=1&&C<短底,短顶,'空'),FONTSIZE25,VALIGN2,COLORGREEN;
    A1:=C>REF(C,4);
    A2:=C<REF(C,4);
    T1:=A2 AND REF(A1,1);
    T2:=A2 AND REF(T1,1);
    T3:=A2 AND REF(T2,1);
    T4:=A2 AND REF(T3,1);
    T5:=A2 AND REF(T4,1);
    T6:=A2 AND REF(T5,1);
    T7:=A2 AND REF(T6,1);
    T8:=A2 AND REF(T7,1);
    T9:=A2 AND REF(T8,1);
    T10:=A2 AND REF(T9,1);
    长顶:EMA(H,90),COLORBLUE;
    长底:EMA(L,90),COLORBLUE;
    DRAWCOLORLINE(C>长顶,长顶,COLORMAGENTA,COLORBLUE);
    DRAWCOLORLINE(C>长底,长底,COLORMAGENTA,COLORBLUE);
    STICKLINE1(C>长顶,长顶,长底,0.01,1),COLORMAGENTA;
    STICKLINE1(C<长底,长顶,长底,0.01,1),COLORBLUE;
    B1:=C<REF(C,4);
    B2:=C>REF(C,4);
    D1:=B2 AND REF(B1,1);
    DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:=EMA(DIF,9);
    MACD:=2*(DIF-DEA);
    D2:=B2 AND REF(D1,1);
    D3:=B2 AND REF(D2,1);
    D4:=B2 AND REF(D3,1);
    D5:=B2 AND REF(D4,1);
    D6:=B2 AND REF(D5,1);
    D7:=B2 AND REF(D6,1);
    D8:=B2 AND REF(D7,1);
    D9:=B2 AND REF(D8,1);
    D10:=B2 AND REF(D9,1);
    AAA:=(2*C+H+L+2*O)/6;
    VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
    VAR2:=(HHV(VAR1,2)+HHV(VAR1,4)+HHV(VAR1,8))/3;
    VAR3:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,8))/3;
    VAR4:=(HHV(VAR2,2)+HHV(VAR2,4)+HHV(VAR2,8))/3;
    短空:=REF(C,1)>REF(短底,1) AND C<短底;
    短多:=REF(C,1)<REF(短顶,1) AND C>短顶;
    短空1:=短空 AND COUNT(短空,BARSLAST(短多))=1;
    
    短多1:=短多 AND COUNT(短多,BARSLAST(短空))=1;
    长空:=REF(C,1)>REF(长底,1) AND C<长底;
    长多:=REF(C,1)<REF(长顶,1) AND C>长顶;
    长空1:=长空 AND COUNT(长空,BARSLAST(长多))=1;
    
    长多1:=长多 AND COUNT(长多,BARSLAST(长空))=1;
    VAR5:=(LLV(VAR3,2)+LLV(VAR3,4)+LLV(VAR3,8))/3;
    VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,8))/3;
    AAE:= WINNER(CLOSE+CLOSE*15/100)*100;
    BBE:= WINNER(CLOSE+CLOSE*0/100)*100;
    CCE:= AAE-BBE;
    DDE:= (WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;
    EEE:= CCE<3 AND DDE<0.5 AND OPEN>LOW;
    AE1:= GETPRICE('LOW');
    AE2:= IF(LOW>AE1,0,IF(HIGH<AE1,1,(AE1-LOW+0.01)/(HIGH-LOW+0.01)));
    AE3:= VOL/WINNER(LOW);
    AE4:= REF(HHV(CLOSE,120),1);
    DRAWKLINE1(H,O,L,C);
    DRAWTEXT(短空1,L*1.02,'短空1'),COLORMAGENTA;
    DRAWTEXT(短多1,L*0.98,'短多1'),COLORMAGENTA;
    DRAWTEXT(长多1,L*0.98,'长多1'),COLORMAGENTA;
    DRAWTEXT(长空1,L*0.98,'长空1'),COLORMAGENTA;
    AE5:= REF(LLV(CLOSE,120),1);
    AE6:= 100*(CLOSE-AE5)/(AE4-AE5);
    AE7:= AE2>0 OR AE2=1;
    AE8:= AE7 AND AE3/REF(AE3,3)>=3 AND AE6<80;
    AE9:= REF(AE8,1) OR REF(AE8,2) OR REF(AE8,3) OR REF(AE8,4);
    AE10:= AE8 AND AE9;
    AE11:= IF(FILTER(AE8,3),5,0);
    AE12:= FILTER(IF(FILTER(AE10,3) OR EEE,10,0),3);
    ZT_1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1);
    ZT_2:=ZT_1>=0.099 AND CLOSE=HIGH AND LOW<>HIGH;
    STICKLINE1(ZT_2,OPEN,CLOSE,2.4,0),COLORYELLOW;
    
    回复

    本版积分规则

    发布新内容
    请关注微信公众号,获取最新指标公式
    加入收藏 我要分享
    分享到论坛或者博客

    复制
    热门指标策略
    快速回复 返回顶部 返回列表