1. 首页 > 主力动向

通达信首个BAR公式(选股公式)

通达信首个BAR公式(选股公式)

内容导航:
  • 通达信如何编写公式
  • 如何将大智慧公式里的函数BARSTATUS改成通达信用的,BARSTATUS是数据位置状态
  • 通达信公式怎么输出
  • 急求MACD指标下载。
  • 求一个选股公式?
  • 通达信条件选股公式编写
  • 股票选股公式
  • Q1:通达信如何编写公式

    通达信函数汇编
    一 、行情函数
    HIGH 最高价
    返回该周期最高价。
    用法: HIGH
    H 最高价
    返回该周期最高价。
    用法: H
    LOW 最低价
    返回该周期最低价。
    用法: LOW
    L 最低价
    返回该周期最低价。
    用法: L
    CLOSE 收盘价
    返回该周期收盘价。
    用法: CLOSE
    C 收盘价
    返回该周期收盘价。
    用法: C
    VOL 成交量
    返回该周期成交量。
    用法: VOL
    V 成交量
    返回该周期成交量。
    用法: V
    OPEN 开盘价
    返回该周期开盘价。
    用法: OPEN
    O: 开盘价
    返回该周期开盘价。
    用法: O
    ADVANCE 上涨家数
    返回该周期上涨家数。
    用法: ADVANCE (本函数仅对大盘有效)
    DECLINE 下跌家数
    返回该周期下跌家数。
    用法: DECLINE (本函数仅对大盘有效)
    AMOUNT 成交额
    返回该周期成交额。
    用法: AMOUNT
    ASKPRICE 委卖价
    返回委卖1--委卖3价格。
    用法: ASKPRICE(N) N取1?3。
    (本函数仅个股在分笔成交分析周期有效)
    ASKVOL 委卖量
    返回委卖1--委卖3量。
    用法: ASKVOL(N) N取1?3。
    (本函数仅个股在分笔成交分析周期有效)

    Q2:如何将大智慧公式里的函数BARSTATUS改成通达信用的,BARSTATUS是数据位置状态

    {下面是改好的指标,在通达信上测试通过,引入即可。}
    SJ11:=(((SJ4 AND NOT((SJ8 AND (SJ9 >= SJ10)))) OR CURRBARSCOUNT) OR (ISLASTBAR));
    SJ12:=(SJ8 AND NOT((SJ4 AND (SJ9 < SJ10))));
    SJ13:=(SJ4 AND NOT((SJ8 AND (SJ9 >= SJ10))));
    SJ14:=(REF(BARSLAST(SJ11),1) + 1);
    SJ15:=BACKSET((SJ11 AND (COUNT(SJ12,SJ14) > 0)),LLVBARS(IF(SJ12,LOW,10000),SJ14));
    SJ16:=(SJ15 > REF(SJ15,1));
    SJ17:=BACKSET(SJ16,2);
    SJ18:=(SJ17 > REF(SJ17,1));
    SJ19:=((SJ18 OR CURRBARSCOUNT) OR (BARSCOUNT(CLOSE) = 1));
    SJ20:=(REF(BARSLAST(SJ19),1) + 1);
    SJ21:=BACKSET((SJ19 AND (COUNT(SJ13,SJ20) > 0)),HHVBARS(IF(SJ13,HIGH,0),SJ20));
    SJ22:=(SJ21 > REF(SJ21,1));
    SJ23:=BACKSET(SJ22,2);
    SJ24:=(SJ23 > REF(SJ23,1));
    SJ25:=BACKSET(CURRBARSCOUNT,(BARSLAST(SJ18) + 1));
    SJ26:=(SJ25 > REF(SJ25,1));
    SJ27:=BACKSET(CURRBARSCOUNT,(BARSLAST(SJ24) + 1));
    SJ28:=(SJ27 > REF(SJ27,1));

    Q3:通达信公式怎么输出

    A0:=LLV(L,N);
    A:=(FRACPART(L))*10;
    A1:=(INTPART(FRACPART(A)*10));
    A2:=(FRACPART(FRACPART(A)*10));
    B:=(INTPART(L))/10;
    B1:=(INTPART(FRACPART(B)*10));
    B2:=(FRACPART(FRACPART(B)*10));
    A1=A2 OR B1=B2;
    点点采纳就好。

    Q4:急求MACD指标下载。

    第一个公式《通达信》
    DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
    DIF:EMA(CLOSE,12) - EMA(CLOSE,26),COLORRED;
    DEA:EMA(DIF,9),COLORBLUE;
    MACD:2*(DIF-DEA),COLORSTICK;
    FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
    FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
    FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
    FH4:=FH1 AND FH2 AND ABS((DIF-DEA)/C)<0.018;
    FH5:=FH1 AND FH2 AND MACD<0.10;
    VV:=CLOSE>OPEN AND MA(CLOSE,5)>MA(CLOSE,10) AND MA(CLOSE,10)>MA(CLOSE,30)
    AND DIFF>DEA AND MACD>REF(MACD,1) AND DIFF>0 AND DEA>0 AND
    MA(VOL,5)>MA(VOL,34) AND MA(CLOSE,30)>=REF(MA(CLOSE,30),1);
    佛手:IF(VV,1,0),NODRAW;
    DRAWICON(佛手,0.06,11);
    二次翻红:(FH3 OR FH4 OR FH5),COLORRED,NODRAW;
    低买:CROSS(DIF,DEA) AND DIF<0,COLORFF00FF,NODRAW;
    加油:CROSS(DIF,DEA) AND DIF>0,COLORYELLOW,NODRAW;
    DRAWICON(二次翻红,-0.05,1);
    DRAWTEXT(二次翻红,-0.15,'↖翻红'),COLORRED;
    DRAWTEXT(CROSS(DIF,DEA) AND DIF<0,DEA-0.02,'↖低买'),COLORFF00FF;
    DRAWTEXT(CROSS(DIF,DEA) AND DIF>0,DEA-0.05,'↖加油'),COLORYELLOW;
    XG:二次翻红 OR 低买 OR 加油,NODRAW;
    YLZC:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
    阻价:=IF(CLOSE=INDEXC,YLZC+INDEXC-INDEXL,YLZC+(CLOSE-LOW));
    支价:=IF(CLOSE=INDEXC,INDEXL+INDEXC-YLZC,LOW+(CLOSE-YLZC));
    今压:REF(阻价,1),LINETHICK0,COLORAA11BB,NODRAW;
    今撑:REF(支价,1),LINETHICK0,COLOR009900,NODRAW;
    明压:阻价,LINETHICK0,NODRAW;
    明撑:支价,LINETHICK0,NODRAW;
    第二个公式《通达信》
    SQX:=(C-MA(CLOSE,13))*100;
    DIF:EMA(MA(SQX,7),1),LINETHICK1;
    DEA:EMA(DIF,7),LINETHICK1;
    MACD: (DIF-DEA)*2,COLORSTICK;
    红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED,LINETHICK1;
    绿柱持币:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORLIBLUE,LINETHICK2;
    低位金叉:IF(CROSS(DIF,DEA) AND DIF<-0.1,0.3,0),COLORYELLOW,POINTDOT;
    STICKLINE(低位金叉,0,10,8,1),COLORYELLOW;
    DRAWICON(低位金叉,0.3,1);
    JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
    二次金叉:IF(CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;
    STICKLINE(二次金叉,25,15,8,1),COLORFF00FF;
    A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
    底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA),0.1,0),COLORRED,POINTDOT;
    STICKLINE(底背离,40,30,8,1),COLORRED;
    DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED;
    A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
    顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF),COLORGREEN;
    DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN;
    A3:=CROSS(DIF,DEA) AND DEA<0;
    零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT;
    STICKLINE(零下二次金叉,45,55,8,1),COLORWHITE;
    金叉:DRAWICON(CROSS(DIF,DEA),DIF,1);
    死叉:DRAWICON(CROSS(DEA,DIF),DIF,2);
    第三个公式 金牌MACD《通达信》
    DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);
    DEA:EMA(DIFF,9);
    MACD:=2*(DIFF-DEA);
    STICKLINE(MACD>=0,MACD,0,2,1),COLORF00FF0;
    STICKLINE(MACD<0,MACD,0,2,1),COLORWHITE;
    STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00AAFF;
    STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00BBFF;
    STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00CCFF;
    STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00DDFF;
    STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00EEFF;
    STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00FFFF;
    STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0000AA;
    STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0011BB;
    STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0022CC;
    STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0033DD;
    STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0044EE;
    STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0055FF;
    STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORAA00BB;
    STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORBB11BB;
    STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORCC22BB;
    STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORDD33BB;
    STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLOREE44BB;
    STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFF55BB;
    STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFAA00;
    STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFBB11;
    STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFCC22;
    STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFDD33;
    STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFEE44;
    STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFFF55;
    IF(DIFF<0,DIFF,0),COLORRED,LINETHICK1;
    IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK1;
    IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1;
    IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;
    低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
    STICKLINE(低位金叉,0,-0.18,2,0),COLORYELLOW;
    DRAWTEXT(低位金叉,-0.1,' 低位金叉'),COLORYELLOW;
    JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
    二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
    STICKLINE(二次金叉,0,-0.18,2,0),COLORFF00FF;
    DRAWICON(二次金叉,DEA*1.04,13) ;
    DRAWTEXT(二次金叉,-0.1,' 二次金叉'),COLORFF00FF;
    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
    底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
    STICKLINE(底背离,0,0.13,2,0),COLOR00FF00;
    DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
    DRAWTEXT(底背离,0.1,' 底背离'),COLOR00FF00;
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
    顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
    DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
    第四个选股公式《通达信》
    DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:=EMA(DIFF,9);
    MACD:=2*(DIFF-DEA);
    JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
    二次金叉:CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

    Q5:求一个选股公式?

    看上涨的比率,资金量大,上涨的幅度比大盘强得多,同板块的股票成交量大,上涨幅度大,就是强于大盘,反过来,就是弱于大盘。

    Q6:通达信条件选股公式编写

    1

    Q7:股票选股公式

    这个条件可以加在这个公式上。

    本文由锦鲤发布,不代表本站立场,转载联系作者并注明出处:/showinfo-5-94227-0.html