当前位置:首页 > 通达信首个BAR公式

通达信首个BAR公式,通达信选股公式源码

来源:本站  发布时间:2022-05-23

Q1:通达信公式编写(求大神指导)

可以按要求编写你说的指标并制作幅图柱状图,但你所说的,只显示最大那根和只显示最小那根其他都不显示这是一个未来函数得效果。你确定要这么显示吗

Q2:如何在通达信显示裴波那挈数列指标公式

{方法有2个:其一:网上找到的公式}

HDAY:=80;LDAY:=80;调点:=3;角度:=100;之字幅度:=25;横向调节:=1;

TCH:=CONST(FINDHIGH(H,0,HDAY*10,1));

GTT:=CONST(BARSLAST(TCH=H))+1;

SX跌H:=CONST(IF(GTT=1,H,REF(H,GTT-1)));

BCL:=CONST(FINDLOW(L,0,LDAY*10,1));

DTT:=CONST(BARSLAST(BCL=L))+1;

SX涨L:=CONST(IF(DTT=1,L,REF(L,DTT-1)));

涨点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L=SX涨L)+1));

跌点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H=SX跌H)+1));

最低:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,涨点,跌点)));

L斜率:=角度/IF(C<300,1000,10);

最高:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,跌点,涨点)));

H斜率:=角度/IF(C<300,1000,10);

IM68:=((SX跌H-SX涨L)/6-(SX跌H-SX涨L)/8);

GH跌X:=SX跌H+(SX跌H-SX涨L)/8;

DL涨X:=SX涨L-(SX跌H-SX涨L)/8;

GTHT:=IF(DTT>GTT,DTT,GTT);

R:=ABS(GTT-DTT);

{斐波那契周期}

DRAWTEXT(CURRBARSCOUNT=GTT,SX跌H*0.98,'斐波那契下跌周期'),COLOR00FF00;

DRAWTEXT(CURRBARSCOUNT=GTT,SX跌H*0.99,'1'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-2,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-2,SX跌H*0.99,'3'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-4,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-4,SX跌H*0.99,'5'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-7,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-7,SX跌H*0.99,'8'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-12,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-12,SX跌H*0.99,'13'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-20,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-20,SX跌H*0.99,'21'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-33,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-33,SX跌H*0.99,'34 '),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-54,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-54,SX跌H*0.99,'55'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-88,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-88,SX跌H*0.99,'89'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-143,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-143,SX跌H*0.99,'144'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-232,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-232,SX跌H*0.99,'233'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-376,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-376,SX跌H*0.99,'377'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-609,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-609,SX跌H*0.99,'610'),COLOR00FF00;

STICKLINE(CURRBARSCOUNT=GTT-986,SX跌H,SX涨L,0,0),COLOR556600;

DRAWTEXT(CURRBARSCOUNT=GTT-986,SX跌H*0.99,'987'),COLOR00FF00;

DRAWTEXT(CURRBARSCOUNT=DTT,SX涨L*1.03,'斐波那契上升周期'),COLOR0000FF;

DRAWTEXT(CURRBARSCOUNT=DTT,SX涨L*1.01,'1'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-2,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-2,SX涨L*1.01,'3'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-4,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-4,SX涨L*1.01,'5'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-7,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-7,SX涨L*1.01,'8'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-12,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-12,SX涨L*1.01,'13'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-20,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-20,SX涨L*1.01.01,'21'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-33,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-33,SX涨L*1.01,'34'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-54,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-54,SX涨L*1.01,'55'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-88,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-88,SX涨L*1.01,'89'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-143,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-143,SX涨L*1.01,'144'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-232,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-232,SX涨L*1.01,'233'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-376,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-376,SX涨L*1.01,'377'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-609,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-609,SX涨L*1.01,'610'),COLOR0000FF;

STICKLINE(CURRBARSCOUNT=DTT-986,SX跌H,SX涨L,0,0),COLORAA00AA;

DRAWTEXT(CURRBARSCOUNT=DTT-986,SX涨L*1.01,'987'),COLOR0000FF;

{其二:系统画线工具里有}

Q3:急求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),LINICK0,COLORAA11BB,NODRAW;
今撑:REF(支价,1),LINICK0,COLOR009900,NODRAW;
明压:阻价,LINICK0,NODRAW;
明撑:支价,LINICK0,NODRAW;
第二个公式《通达信》
SQX:=(C-MA(CLOSE,13))*100;
DIF:EMA(MA(SQX,7),1),LINICK1;
DEA:EMA(DIF,7),LINICK1;
MACD: (DIF-DEA)*2,COLORSTICK;
红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED,LINICK1;
绿柱持币:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORLIBLUE,LINICK2;
低位金叉: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,LINICK1;
IF(DIFF<0,0,DIFF),COLORYELLOW,LINICK1;
IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINICK1;
IF(DIFF>DEA,DEA,DEA),COLORWHITE,LINICK1;
低位金叉:=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,LINICK2;
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,LINICK2;
第四个选股公式《通达信》
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;

Q4:通达信如何编写公式

通达信函数汇编
一 、行情函数
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。
(本函数仅个股在分笔成交分析周期有效)

Q5:通达信选股公式条件怎么设置方法

1、打开通达信软件——功能——选股器——条件选股——选中某系统自带公式——加入条件——选择选股周期——执行选股(或选股入某一板块)——等待选股结果。
2、打开通达信软件——功能——选股器——综合选股——找到选中某自编公式——加入条件——选股周期——执行选股——等待选股结果。
其他选定的条件选股类似,稍稍摸索既能搞定。祝您好运。

如果对您有帮助,请记得采纳答案,谢谢。

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

1

上一篇:上一篇:上市公司股票停牌了什么意思
下一篇:下一篇:2021年三季度机构持仓