最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 自己写的主图公式和选股公式,希望大家喜欢

    正文概述    2024-04-07 08:46:39  
    点击下载此公式

    {引用MA}
    第一步,{引用MA}主图公式
    {n 2 999 30}
    MA_H:MA(HIGH,N);
    MA_L:MA(LOW,N);
    MA_C:MA(CLOSE,N);


    第二步,火车轨主图公式
    按步骤写才能通过

    主图公式

    上轨:MA(HIGH,30);
    下轨:MA(LOW,30);
    日上轨: 引用MA.MA_H#DAY (30);
    日下轨: 引用MA.MA_L#DAY (30);
    S:=CROSS(CLOSE,日上轨);
    X:=CROSS(日下轨,CLOSE);
    WS:=BARSLAST(S)+1;
    WX:=BARSLAST(X)+1;
    SS:=CROSS(SUM(S,WX),0.5);
    XX:=CROSS(SUM(X,WS),0.5);
    DRAWICON(SS,LOW-0.1,1);
    DRAWTEXT(SS,LOW-0.2, 买入 ),COLORRED;
    DRAWICON(XX,HIGH+0.1,2);
    DRAWTEXT(XX,HIGH+0.2, 卖出 ),COLORGREEN;
    周上轨: 引用MA.MA_H#WEEK (30);
    周下轨: 引用MA.MA_L#WEEK (30);
    STICKLINE(CLOSE 日上轨,日上轨,日下轨,2,1),COLORGRAY;
    STICKLINE(CLOSE 日下轨,日下轨,日上轨,2,1),COLORFF0000;
    STICKLINE(CLOSE 周上轨,周上轨,周下轨,2,1),COLORGRAY;
    STICKLINE(CLOSE 周下轨,周下轨,周上轨,2,1),COLORFF0000;
    IF(CLOSE 上轨,上轨,DRAWNULL),COLORRED;
    IF(CLOSE 上轨,上轨,DRAWNULL),COLORGREEN;
    IF(CLOSE 下轨,下轨,DRAWNULL),COLORGREEN;
    IF(CLOSE 日上轨,日上轨,DRAWNULL),COLORRED;
    IF(CLOSE 日上轨,日上轨,DRAWNULL),COLORGREEN;
    IF(CLOSE 日下轨,日下轨,DRAWNULL),COLORRED;
    IF(CLOSE 日下轨,日下轨,DRAWNULL),COLORGREEN;
    IF(CLOSE 周上轨,周上轨,DRAWNULL),COLORRED;
    IF(CLOSE 周上轨,周上轨,DRAWNULL),COLORGREEN;
    IF(CLOSE 周下轨,周下轨,DRAWNULL),COLORRED;
    IF(CLOSE 周下轨,周下轨,DRAWNULL),COLORGREEN;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,3,0),COLORFF5B00;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2.8,0),COLORFF6C00;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2.5,0),COLORFF7B00;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2.2,0),COLORFF9C00;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2,0),COLORFFBE00;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1.5,0),COLORFFCC00;
    STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1,0),COLORFFFF00;
    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,3,0),COLORRED;
    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,2.5,0),COLORRED;
    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,2.2,0),COLORRED;
    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1.8,0),COLORRED;
    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1.5,0),COLORRED;
    STICKLINE(CLOSE =OPEN,CLOSE,OPEN,1,0),COLORRED;
    {www.9m8.cn 九毛八公式指标网}
    MA20:=MA(C,20),COLORWHITE,LINETHICK2;
    MA120:=MA(C,120),COLORFFCCCC,LINETHICK2;
    MA250:=MA(C,250),COLORFFCC66,LINETHICK2;
    乖离线:=((C-REF(MA20,1))/20+MA20)*1.20;
    TT1:=CROSS(MA20,MA120) AND CROSS(MA20,MA250) AND V REF(V,1);
    TT2:=MA20 REF(MA20,2) AND V REF(V,1) AND CROSS(C,MA20);
    STICKLINE(TT1,L,L-0.09,4,0),COLORYELLOW;
    DRAWTEXT(TT1,L-0.13, 金叉 ),COLORYELLOW;
    STICKLINE(CROSS(C,MA120) AND CROSS(C,MA250) AND CROSS(C,MA20),L,L-0.09,4,0),COLORYELLOW;
    DRAWTEXT(CROSS(C,MA120) AND CROSS(C,MA250) AND CROSS(C,MA20),L-0.13, 并线开花 ),COLORYELLOW;
    STICKLINE(TT2,L,L-0.09,4,0),COLORYELLOW;
    DRAWTEXT(TT2,L-0.13, 买点1 ),COLORYELLOW;
    STICKLINE(CROSS(C,乖离线),H,H+0.09,4,0),COLOR00FF00;
    DRAWTEXT(CROSS(C,乖离线) ,H+0.13, 卖点 ),COLOR00FF00;
    STICKLINE(MA250 =REF(MA250,1) AND MA20 =REF(MA20,1) AND CROSS(C,MA250),L,L-0.09,4,0),COLORFFCC66;
    DRAWTEXT(MA250 =REF(MA250,1) AND MA20 =REF(MA20,1) AND CROSS(C,MA250),L-0.13, 牛象 ),COLORFFCC66;
    STICKLINE(MA120 =REF(MA120,1) AND CROSS(C,MA20) AND CROSS(C,MA120) AND V REF(V,1),L,L-0.09,4,0),COLORFF00FF;
    DRAWTEXT(MA120 =REF(MA120,1) AND CROSS(C,MA20) AND CROSS(C,MA120) AND V REF(V,1),L-0.13, 买点2 ),COLORFF00FF;

    选股公式

    源码如下:

    VAR1:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;
    VAR2:=SMA(VAR1,3,1);
    VAR3:=SMA(VAR2,3,1);
    VAR4:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
    VAR5:=CROSS(VAR4,10) AND VAR3
    抄底:VAR5;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 自己写的主图公式和选股公式,希望大家喜欢 加入收藏