最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 飞狐楚河汉界主图指标源码

    正文概述    2024-04-14 15:07:51  

    VAR1:=REF(CLOSE,1);
    VAR2:=IF(VAR1>HIGH,VAR1,0);
    VAR3:=IF(HIGH>=VAR1 AND VAR1>LOW,HIGH,0);
    VAR4:=IF(VAR1<=LOW,HIGH,0);
    VAR5:=VAR2+VAR3+VAR4;
    VAR6:=IF(VAR1>HIGH,LOW,0);
    VAR7:=IF(HIGH>=VAR1 AND VAR1>LOW,LOW,0);
    VAR8:=IF(VAR1<=LOW,VAR1,0);
    VAR9:=VAR6+VAR7+VAR8;
    VAR10:=SMA(VAR5-VAR9,40,1);
    VAR11:=EMA(CLOSE,40)+3.5*VAR10;
    VAR12:=EMA(CLOSE,40)-3.5*VAR10;
    VAR13:=(VAR11+VAR11+VAR11+VAR12)/4;
    VAR14:=(VAR11+VAR12+VAR12+VAR12)/4;
    VAR15:=EMA(CLOSE,32);
    VAR16:=EMA(CLOSE,80);
    FILLRGN(VAR15>=VAR16,EMA(VAR11,4),EMA(VAR12,4)),color9966CC;
    FILLRGN(VAR15 FILLRGN(EMA(CLOSE,8)>=EMA(CLOSE,20),EMA(VAR13,4),EMA(VAR14,4)),colorFF99CC;
    FILLRGN(EMA(CLOSE,8) VAR17:=OPEN;
    VAR18:=HIGH;
    VAR19:=LOW;
    VAR20:=CLOSE;
    VAR20[1]:=(2*VAR20[1]+VAR18[1]+VAR19[1])/4;
    FOR I=2 TO DATACOUNT DO BEGIN
    VAR17[I]:=(VAR17[I-1]+VAR20[I-1])/2;
    VAR18[I]:=IF(VAR17[I]>VAR18[I],VAR17[I],VAR18[I]);
    VAR19[I]:=IF(VAR17[I] VAR20[I]:=(2*VAR20[I]+VAR18[I]+VAR19[I])/4;
    END;
    KK:=IF(VAR20>=VAR17 AND (VAR20>=REF(VAR20,1) OR REF(VAR20,1)>=REF(VAR17,1)),1,IF(VAR20 明日转折:ROUND((VAR17+VAR20)/2),SHIFT1,LINETHICK0,colorFFFF;
    今日转折:=ROUND(IF(KK=1,MIN(VAR20,VAR17),IF(KK=-1,MAX(VAR20,VAR17),IF(REF(KK,1)=1,MIN(VAR20,VAR17),IF(REF(KK,1)=-1,MAX(VAR20,VAR17),(VAR20+VAR17)/2)))));
    DRAWNUMBER(ISLASTBAR,明日转折,ROUND(明日转折),2),SHIFT3;
    STICKLINE(VAR20>VAR17,VAR18,VAR19,0.4,0),colorFF;
    STICKLINE(VAR17>VAR20,VAR18,VAR19,0.4,0),colorFF0000;
    STICKLINE(KK=1 AND VAR20>=VAR17,VAR17,VAR20,8,0),colorFF;
    STICKLINE(KK=1 AND VAR20 STICKLINE(KK=-1 AND VAR20>=VAR17,VAR17,VAR20,8,0),colorFF0000;
    STICKLINE(KK=-1 AND VAR20 STICKLINE(KK=0 AND VAR20>=VAR17,VAR17,VAR20,8,0),colorFF;
    STICKLINE(KK=0 AND VAR20 STICKLINE(CROSS(BACKSET(ISLASTBAR,10),1),EMA(VAR12,4),EMA(VAR12,4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,9),1),REF(EMA(VAR12,4),1),REF(EMA(VAR12,4),1),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,8),1),REF(EMA(VAR12,4),2),REF(EMA(VAR12,4),2),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,7),1),REF(EMA(VAR12,4),3),REF(EMA(VAR12,4),3),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,6),1),REF(EMA(VAR12,4),4),REF(EMA(VAR12,4),4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,5),1),REF(EMA(VAR12,4),5),REF(EMA(VAR12,4),5),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,4),1),REF(EMA(VAR12,4),6),REF(EMA(VAR12,4),6),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,3),1),REF(EMA(VAR12,4),7),REF(EMA(VAR12,4),7),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,2),1),REF(EMA(VAR12,4),8),REF(EMA(VAR12,4),8),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR12,4),9),REF(EMA(VAR12,4),9),10,0),LINETHICK3,color80;
    DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR12,4),9),REF(EMA(VAR12,4),9),1),SHIFT1;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,10),1),EMA(VAR11,4),EMA(VAR11,4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,9),1),REF(EMA(VAR11,4),1),REF(EMA(VAR11,4),1),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,8),1),REF(EMA(VAR11,4),2),REF(EMA(VAR11,4),2),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,7),1),REF(EMA(VAR11,4),3),REF(EMA(VAR11,4),3),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,6),1),REF(EMA(VAR11,4),4),REF(EMA(VAR11,4),4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,5),1),REF(EMA(VAR11,4),5),REF(EMA(VAR11,4),5),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,4),1),REF(EMA(VAR11,4),6),REF(EMA(VAR11,4),6),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,3),1),REF(EMA(VAR11,4),7),REF(EMA(VAR11,4),7),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,2),1),REF(EMA(VAR11,4),8),REF(EMA(VAR11,4),8),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR11,4),9),REF(EMA(VAR11,4),9),10,0),LINETHICK3,color80;
    DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR11,4),9),REF(EMA(VAR11,4),9),1),SHIFT1;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,10),1),EMA(VAR13,4),EMA(VAR13,4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,9),1),REF(EMA(VAR13,4),1),REF(EMA(VAR13,4),1),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,8),1),REF(EMA(VAR13,4),2),REF(EMA(VAR13,4),2),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,7),1),REF(EMA(VAR13,4),3),REF(EMA(VAR13,4),3),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,6),1),REF(EMA(VAR13,4),4),REF(EMA(VAR13,4),4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,5),1),REF(EMA(VAR13,4),5),REF(EMA(VAR13,4),5),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,4),1),REF(EMA(VAR13,4),6),REF(EMA(VAR13,4),6),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,3),1),REF(EMA(VAR13,4),7),REF(EMA(VAR13,4),7),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,2),1),REF(EMA(VAR13,4),8),REF(EMA(VAR13,4),8),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR13,4),9),REF(EMA(VAR13,4),9),10,0),LINETHICK3,color80;
    DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR13,4),9),REF(EMA(VAR13,4),9),1),SHIFT1;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,10),1),EMA(VAR14,4),EMA(VAR14,4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,9),1),REF(EMA(VAR14,4),1),REF(EMA(VAR14,4),1),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,8),1),REF(EMA(VAR14,4),2),REF(EMA(VAR14,4),2),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,7),1),REF(EMA(VAR14,4),3),REF(EMA(VAR14,4),3),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,6),1),REF(EMA(VAR14,4),4),REF(EMA(VAR14,4),4),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,5),1),REF(EMA(VAR14,4),5),REF(EMA(VAR14,4),5),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,4),1),REF(EMA(VAR14,4),6),REF(EMA(VAR14,4),6),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,3),1),REF(EMA(VAR14,4),7),REF(EMA(VAR14,4),7),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,2),1),REF(EMA(VAR14,4),8),REF(EMA(VAR14,4),8),10,0),LINETHICK3,color80;
    STICKLINE(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR14,4),9),REF(EMA(VAR14,4),9),10,0),LINETHICK3,color80;
    DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,1),1),REF(EMA(VAR14,4),9),REF(EMA(VAR14,4),9),1),SHIFT1;
    VAR21:=(REF(EMA(VAR13,4),9)+REF(EMA(VAR14,4),9))/2;
    STICKLINE(ISLASTBAR,VAR21,VAR21,12,0);
    DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,1),1),VAR21,VAR21,1),SHIFT1;
    西楚霸王:EMA((351*(EMA(CLOSE,24)-EMA(CLOSE,52))-297*EMA(CLOSE,24)+325*EMA(CLOSE,52))/28,2);
    A1:=BARSLAST(CROSS(VAR20,西楚霸王) AND 西楚霸王>=REF(西楚霸王,1) OR VAR20>西楚霸王 AND 西楚霸王>=REF(西楚霸王,1) AND REF(西楚霸王,1) A2:=BARSLAST(CROSS(西楚霸王,VAR20) AND 西楚霸王=REF(西楚霸王,2));
    DRAWTEXT(CROSS(A2,A1),VAR19,'▲'),ALIGN0,PXDN20,colorFF;
    DRAWTEXT(CROSS(A2,A1),VAR19,'▲'),ALIGN0,PXDN45,colorFF;
    DRAWTEXT(CROSS(A1,A2),VAR18,'▼'),ALIGN0,PXUP30,colorFF0000;
    DRAWTEXT(CROSS(A1,A2),VAR18,'▼'),ALIGN0,PXUP55,colorFF0000;
    PARTLINE(西楚霸王>=REF(西楚霸王,1),西楚霸王),LINETHICK3,colorFF;
    PARTLINE(西楚霸王  


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 飞狐楚河汉界主图指标源码 加入收藏