通达信指标公式源码概况:

指标类别: 通达信指标公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、分时macd指标公式

  

OBV0:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);  

OBV:=OBV0/100000;  

MA30:=MA(OBV,21);  

OBV1:=OBV-MA30;  

长均:EMA(OBV1,100),COLORWHITE;  

中均:EMA(OBV1,20)COLORYELLOW;  

短均:EMA(OBV1,5),COLORRED;  

STICKLINE(中均>长均ANDREF(中均,1)<REF(短均,1)AND短均<=中均,中均,0,2,0)COLORGREEN,NODRAW;  

STICKLINE(REF(中均,1)>REF(短均,1)AND短均>=中均ANDOBV1>REF(OBV1,1),中均,0,2,0),COLORRED;  

TY:=OBV1;  

AA1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(AA1,10);HD:=FILTER(B1,10);  

AA2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(AA2,10);LD:=FILTER(B2,10);  

AB:=REF(OBV1,BARSLAST(HD));  

T1:=BARSLAST(HD)<BARSLAST(LD)ANDNOT(HD);  

T2:=BARSLAST(HD)>BARSLAST(LD)ANDNOT(LD);  

峰:=IF(T1,AB,AB),COLORYELLOW,LINETHICK1;  

DIFF:=EMA(CLOSE,5)-EMA(CLOSE,13);  

DEA:=EMA(DIFF,9),COLORFFFF00;  

A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));  

背离:=REF(CLOSE,A1+1)>CLOSEANDDIFF>REF(DIFF,A1+1)ANDCROSS(DIFF,DEA);  

MACD底背离:IF(底背离,HHV(OBV1,50)*0.5,0),LINETHICK2,COLORRED;  

DRAWTEXT(底背离,HHV(OBV1,50)*0.4,'←底背离'),COLORRED;  

OVC1:=BARSLAST(REF(CROSS(DEA,DIFF),1));  

顶背离:=REF(C,OVC1+1)DIFFANDCROSS(DEA,DIFF),COLORFF00FF,LINETHICK2;  

MACD顶背离:IF(顶背离,HHV(OBV1,50)*0.4,0),LINETHICK2,COLORGREEN;  

DRAWTEXT(顶背离>0,HHV(OBV1,50)*0.4,'←顶背离'),COLORGREEN;  

OOBV:0,LINETHICK2,COLORBLUE;  

A1:=(DVOL/C)/2,NODRAW;  

A2:=SUM(IF(A1>100ANDCLOSE>REF(CLOSE,1),A1,0),0);  

A3:=SUM(IF(A1>100ANDCLOSE<REF(CLOSE,1),A1,0),0);  

A4:=SUM(IF(A1<100andclose>REF(CLOSE,1),A1,0),0);  

A5:=SUM(IF(A1<100ANDCLOSE<REF(CLOSE,1),A1,0),0);  

A6:=A2+A3+A4+A5;  

机买:(A2/A6)*100,LINETHICK2,COLORRED;  

机卖:(A3/A6)*100,LINETHICK2,COLORGREEN;  

散买:(A4/A6)*100,LINETHICK0;  

散卖:(A5/A6)*100,LINETHICK0;  

主力差:机买-机卖,LINETHICK2,NODRAW;  

散户差:散买-散卖,LINETHICK0,NODRAW;  

DRAWTEXT(主力差>0ANDREF(主力差,1)<=0,C*0.75,'●机构'),COLORRED;  

DRAWTEXT(主力差<0andref(主力差,1)>=0,-C*0.75,'○机构'),COLORWHITE;  

DRAWTEXT(散户差>0ANDREF(散户差,1)<=0,C*0.25,'▲散户'),COLORCYAN;  

DRAWTEXT(散户差<0andref(散户差,1)>=0,-C*0.25,'△散户'),COLORWHITE;  

M:=180;  

VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);  

OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0),COLORMAGENTA,LINETHICK2;  

MAOBV:MA(OBV,M),COLORRED,LINETHICK2;  

IF(OBV<=REF(OBV,1),OBV,DRAWNULL),COLORCYAN,LINETHICK2;  

IF(MAOBV<=REF(MAOBV,1),MAOBV,DRAWNULL),COLORGREEN,LINETHICK2;  

D1:=COUNT(CROSS(OBV,MAOBV),1)=1;  

DRAWICON(D1,OBV-0,1);{OBV显示1号图标};  

{分时突破:=C/REF(C,1)>1.02ANDV*240/FROMOPEN/REF(MA(V,1),1)>=2ANDC=HANDREF(C,1)/L<1.015ANDC/REF(C,1)<1.07;  

DRAWICON(分时突破,OBV-0,25);{OBV显示25号图标};  

所属行业:DRAWTEXT_FIX(ISLASTBAR,0.08,1,1,HYBLOCK),COLORYELLOW;  

所属地域:DRAWTEXT_FIX(ISLASTBAR,0.10,1,0,DYBLOCK),COLORYELLOW;  

瘦石:=IF(C>REF(C,1),VOL,0);  

昨拉升最高值:CONST(REF(HHV(瘦石,FROMOPEN),239)),LINETHICK1,COLORMAGENTA;  

今拉升最高值:CONST(REF(HHV(瘦石,FROMOPEN),0)),COLORYELLOW,NODRAW;  

攻击力度:今拉升最高值/昨拉升最高值,NODRAW;  

STICKLINE(C>REF(C,1),0,V,0,0),COLOR0000FF;  

STICKLINE(C<REF(C,1),0,V,0,0),COLOR00FF00;  

STICKLINE(C=REF(C,1),0,V,0,0),COLORFFFFFF;  

MID:=MA(C,20);  

VART1:=POW((C-MID),2);  

VART2:=MA(VART1,20);  

VART3:=SQRT(VART2);  

UPPER:=MID+2*VART3;  

LOWER:=MID-2*VART3;  

boll:=REF(MID,1);  

UB:=REF(UPPER,1);  

LB:=REF(LOWER,1);  

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);  

DEA:=EMA(DIFF,9);  

MACD:=2*(DIFF-DEA);  

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;  

K:=SMA(RSV,3,1);  

D:=SMA(K,3,1);  

J:=3*K-2*D;  

XG:MACD>0ANDDIFF>0ANDDIFF>DEAANDJ>KANDJ>DANDK>DANDJ<70andboll>REF(BOLL,1)ANDUB>REF(UB,1)ANDLB<REF(LB,1);

image.png

二、macd分时买卖指标公式

  

N:=13;  

WR1:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));  

ENTERLONG:CROSS(80,WR1);  

EXITLONG:CROSS(WR1,20);  

DRAWICON(ENTERLONG,(WR1,80),9);  

DRAWICON(EXITLONG,(WR1,20),10);  

A1:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-VOL/CAPITAL*100,0)),0);  

成交额:=V*C/100,NODRAW;{万元}  

A2:=SUM((IF(((成交额/8>20)AND(CLOSE>(REF(CLOSE,1)))),成交额,0)),0);  

A3:=SUM((IF(((成交额/8>20)AND(CLOSE<(REF(CLOSE,1)))),成交额,0)),0);  

A4:=SUM((IF(((成交额/8<20)and(close>(REF(CLOSE,1)))),成交额,0)),0);  

A5:=SUM((IF(((成交额/8<20)AND(CLOSE<(REF(CLOSE,1)))),成交额,0)),0);  

A6:=((A2+A3)+A4)+A5;  

A7:=IF((ISLASTBAR),((100*A2)/A6),0);  

A8:=IF((ISLASTBAR),((100*A3)/A6),0);  

A9:=IF((ISLASTBAR),((100*A4)/A6),0);  

A10:=IF((ISLASTBAR),((100*A5)/A6),0);  

增减仓%:A1;  

机构买盘:(A2),LINETHICK6,COLORRED;  

机构卖盘:(A3),LINETHICK6,COLORFFFF55;  

机构进出:机构买盘-机构卖盘,NODRAW;  

散户买盘:(A4),COLOR5555FF;{细红线}  

散户卖盘:(A5),COLOR55FF55;{细绿线}  

强势:((100*A2)/A6>50);  

STICKLINE(强势,机构买盘*1.02,机构买盘*1.1,1,0),COLORYELLOW;  

拉升:((100*A2)/A6-(100*A3)/A6)>18AND(100*A2)/A6-(100*A5)/A6>18;  

STICKLINE(拉升,机构买盘*1.1,机构买盘*1.2,1,0),COLORFF00FF;  

DRAWTEXT(ISLASTBAR=1,机构买盘*0.95,'●机构买盘'),LINETHICK2,COLORRED;  

DRAWTEXT(ISLASTBAR=1,机构卖盘*0.95,'○机构卖盘'),LINETHICK2,COLORFFFF55;  

DRAWTEXT(机构进出>0ANDREF(机构进出,1)<=0,机构买盘*1.02,'●机买'),COLORRED;  

DRAWTEXT(机构进出<0andref(机构进出,1)>=0,机构买盘*0.98,'○机卖'),COLORFFFF55;  

EXP1:=EMA(CLOSE,17);  

EXP2:=EMA(CLOSE,17);  

A1:=C>O;{说出票少,会站岗那就改为当天阳线,有需涨停换为C/REF(C,1)>1.099,}  

A2:=LOW>EXP1;  

BOLL:=MA(CLOSE,25);  

A3:=LOW>BOLL;  

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);  

DEA:=EMA(DIF,9);  

MACD:=2*(DIF-DEA);  

A4:=CROSS(DIF,DEA);  

A5:=REF(A4,1);  

A6:=COUNT(A5,21)>0;{今天之前3个星期以来曾经金叉}  

停牌:=IF((C=0ORV=0),0,1);  

一字板:=NOT(C=OANDH=L);  

XG:A1ANDA2ANDA3ANDA4ANDA6AND停牌AND一字板;  

input:n(26,5,300),p(2,0.1,10);  

MA13:MA(C,13),COLORFF9900,DOTLINE;  

MID:MA(CLOSE,N),DOTLINE;  

UPPER:MID+P*STD(CLOSE,N),DOTLINE;  

LOWER:MID-P*STD(CLOSE,N),DOTLINE;  

X:=BARSLAST(DISPSTATUS=1)+1;  

E:=llvall(llv(l,x))*0.95;  

DIFF:EMA(EMA(CLOSE,12)-EMA(CLOSE,26),3),COLOR0000FF,LINETHICK0;  

DEA:EMA(DIFF,9),COLOR00FF00,LINETHICK0;  

MACD:2*(DIFF-DEA),LINETHICK0;  

STICKLINE(MACD>0,E+MACD*3,E,18,0),Color0000FF;  

STICKLINE(MACD<0,E+MACD,E,1,0),Color00FF00;  

DRAWGBK(MACD>0,STRIP(RGB(0,0,255),RGB(140,0,80),0)),LAYER0;  

VERTLINE(CROSS(REF(WMA(C,13),1),WMA(C,13))ANDMACD>0andMA13>MID,2),LAYER0,COLOR00FFff;  

PARTLINE(UPPER,UPPERandMACD>0,rgb(255,120,0)),LINETHICK3,LAYER0;  

PARTLINE(MID,MIDandMACD>0,rgb(0,255,0)),LINETHICK3,LAYER0;  

PARTLINE(MA13,MA13andMACD>0,rgb(255,255,0)),LINETHICK3,LAYER0;  

PK:=CROSS(0,MACD)ANDMACD<0;  

DRAWTEXT(PK,LOWER*0.999,'●'),LAYER3,ALIGN1,COLOR0000FF,LINETHICK2;  

DRAWTEXT(PK,LOWER*0.981,'【别】'),LAYER0,ALIGN1,COLOR00FFFF,LINETHICK1;  

DRAWTEXT(PK,LOWER*0.963,'【坐】'),LAYER0,ALIGN1,COLOR00FFCC,LINETHICK1;  

DRAWTEXT(PK,LOWER*0.946,'【过】'),LAYER0,ALIGN1,COLOR00FFAA,LINETHICK1;  

DRAWTEXT(PK,LOWER*0.929,'【山】'),LAYER0,ALIGN1,COLOR00FF77,LINETHICK1;  

DRAWTEXT(PK,LOWER*0.912,'【车】'),LAYER0,ALIGN1,COLOR00FF00,LINETHICK1;  

dif:(ema(C,12)-ema(C,26))/ema(C,26)*100;  

DEA:ema(DIF,9);  

MACD:2*(DIF-DEA),COLORSTICK;  

cci1:=(EMA(C,14)-C)/(AVEDEV(C,14)*0.3);  

CCI2:=(EMA(C,28)-C)/(AVEDEV(C,28)*0.3);  

CCI3:=(EMA(C,42)-C)/(AVEDEV(C,42)*0.3);  

CCI4:=(EMA(C,56)-C)/(AVEDEV(C,56)*0.3);  

CCI5:=(EMA(C,70)-C)/(AVEDEV(C,70)*0.3);  

CCI6:=(EMA(C,84)-C)/(AVEDEV(C,84)*0.3);  

JCI:=(CCI1+CCI2+CCI3+CCI4+CCI5+CCI6)/6;  

DCI:=MAX(CCI1,MAX(CCI2,MAX(CCI3,MAX(cci4,MAX(CCI5,CCI6)))));  

XCI:=MIN(CCI1,MIN(CCI2,MIN(CCI3,MIN(cci4,MIN(CCI5,CCI6)))));  

CCI:EMA(ema(EMA(ema(EMA(EMA(IF(CCI1>=DCI,(JCI+(DCI-XCI)*0.382),(JCI+6*DCI)/7),3),2),2),2),2),2);

image.png

[源码注释]通达信公式动态翻译结果

RSV1赋值:(收盘价-9日内最低价的最低值)/(9日内最高价的最高值-9日内最低价的最低值)*100

K赋值:RSV1的3日[1日权重]移动平均,线宽为1,画白色

D赋值:K的3日[1日权重]移动平均,线宽为1,COLOR00DDDD

DIF赋值:(收盘价的12日指数移动平均-收盘价的26日指数移动平均)*100,线宽为1

DEA赋值:DIF的9日指数移动平均,线宽为1

输出获利比例:以收盘价计算的获利盘比例*100

输出A:(K+DIF)/2

输出B:(DEA+D)/2

输出J:3*A-2*B

推荐阅读:分时副图macd买卖点指标公式

  

A1:=(DVOL/CLOSE)/2;  

A2:=SUM(IF(A1>100ANDCLOSE>REF(CLOSE,1),A1,0),0);  

A3:=SUM(IF(A1>100ANDCLOSE<REF(CLOSE,1),A1,0),0);  

A4:=SUM(IF(A1<100andclose>REF(CLOSE,1),A1,0),0);  

A5:=SUM(IF(A1<100ANDCLOSE<REF(CLOSE,1),A1,0),0);  

机构买盘:A2,LINETHICK8,COLOR5555FF;  

机构卖盘:A3,LINETHICK8,COLOR55FF55;  

散户买盘:A4,COLORFF55FF;  

散户卖盘:A5,COLORFFFF55;  

内盘:=DYNAINFO(22);  

外盘:=DYNAINFO(23);  

外内盘差:(外盘-内盘),NODRAW;  

STICKLINE(外内盘差>0,机构买盘,机构卖盘,0.000001,0),COLORRED;  

STICKLINE(外内盘差<0,机构买盘,机构卖盘,0.000001,0),COLORGREEN;  

STICKLINE(外内盘差>0AND机构买盘=机构卖盘,散户买盘,散户卖盘,0.000001,0),COLORRED;  

STICKLINE(外内盘差<0AND机构买盘=机构卖盘,散户买盘,散户卖盘,0.000001,0),COLORGREEN;  

虎:(EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,COLORSTICK;  

主力:EXPMA((EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,120)-0.0004,LINETHICK5,COLORMAGENTA;  

散户:EXPMA((EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,200),LINETHICK5,COLORGREEN;  

DRAWICON(CROSS(EXPMA(虎,120)-0.0004,EXPMA(虎,200)),EXPMA(虎,200)*1,13);  

DRAWICON(CROSS(EXPMA(虎,200),EXPMA(虎,120)-0.0004),EXPMA(虎,200)*1,2);  

Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);  

Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));  

DRAWICON(CROSS((C/Q2),1.03),0.02,6);  

STICKLINE(CROSS((C/Q2),1.03),0.02,0,4,0),,COLORYELLOW;  

AL:=(C+L+H)/3;  

AO:=SMA(AL,5,1)-SMA(AL,13,1);  

BBD:(AO-SMA(AO,3,1))*100,COLORFFCCFF,NODRAW;  

{动能线定义}  

动能线:AO*10,COLORRED;  

动能辅线:EMA(AO,5)*10,COLOR00FF00;  

{动能线强弱分界带}

DRAWBAND(动能辅线,RGB(115,95,95),0,RGB(95,95,115));  

{动能彩带}  

DRAWBAND(动能线,RGB(175,0,55),动能辅线,RGB(55,175,0));  

{BBD支撑线定义}

BBD支撑线:SMA(BBD,5,2),COLOR0033FF,LINETHICK2;  

RSV1:=BBD;  

RSV2:=BBD支撑线;  

弱:IF(BACKSET(RSV2<REF(RSV2,1),1),RSV2,DRAWNULL),LINETHICK2,COLORFF3300;  

{BBD彩色柱体}  

BBD1:=IF(BBD>=REF(BBD,1),BBD,DRAWNULL);  

BBD2:=IF(BBD<REF(BBD,1),BBD,DRAWNULL);  

STICKLINE(BBD1,0,BBD,1.5,0),COLOR885588;  

STICKLINE(BBD1,0,BBD,1,0),COLORAA77AA;  

STICKLINE(BBD1,0,BBD,0.5,0),COLORBB99BB;  

STICKLINE(BBD1,0,BBD,0.1,0),COLORDDAADD;  

STICKLINE(BBD2,0,BBD,1.5,0),COLOR757500;  

STICKLINE(BBD2,0,BBD,1,0),COLORAAAA00;  

STICKLINE(BBD2,0,BBD,0.5,0),COLORBBBB00;  

STICKLINE(BBD2,0,BBD,0.1,0),COLORDDDD00;  

{BBD支撑线金叉死叉顶底背离}  

BBD金叉:IF(CROSS(RSV1,RSV2),RSV2,DRAWNULL),CIRCLEDOT,COLORFF33FF;  

BBD死叉:IF(CROSS(RSV2,RSV1),RSV2,DRAWNULL),CIRCLEDOT,COLORFFFF00;  

SV1:=BARSLAST(REF(CROSS(RSV1,RSV2),1));  

SV1A:=REF(CLOSE,SV1+1)>CLOSEANDRSV1>REF(RSV1,SV1+1)AND  

CROSS(RSV1,RSV2);

B底背:IF(SV1A,RSV2,DRAWNULL),COLOR3366FF;  

DRAWTEXT(SV1A,RSV2,'—B底背'),COLOR0033FF;  

SV2:=BARSLAST(REF(CROSS(RSV2,RSV1),1));  

SV2A:=REF(CLOSE,SV2+1)RSV1ANDCROSS(RSV2,RSV1);  

B顶背:IF(SV2A,RSV2,DRAWNULL),COLORFFFF00;  

DRAWTEXT(SV2A,RSV2,'—B顶背'),COLORFFFF00;  

{动能线金叉死叉顶底背离}  

RSV3:=动能线;  

RSV4:=动能辅线;  

动能金叉:IF(CROSS(RSV3,RSV4),RSV3,DRAWNULL),CIRCLEDOT,COLOR0000FF;  

动能死叉:IF(CROSS(RSV4,RSV3),RSV3,DRAWNULL),CIRCLEDOT,COLOR00FF00;  

SV3:=BARSLAST(REF(CROSS(RSV3,RSV4),1));  

SV3A:=REF(CLOSE,SV3+1)>CLOSEANDRSV3>REF(RSV3,SV3+1)AND  

CROSS(RSV3,RSV4);  

动底背:IF(SV3A,RSV3,DRAWNULL),COLOR0000FF;  

DRAWTEXT(SV3A,RSV3,'—动底背'),COLOR0000FF;  

SV4:=BARSLAST(REF(CROSS(RSV4,RSV3),1));  

SV4A:=REF(CLOSE,SV4+1)RSV3ANDCROSS(RSV4,RSV3);  

动顶背:IF(SV4A,RSV3,DRAWNULL),COLOR00FF00;  

DRAWTEXT(SV4A,RSV3,'—动顶背'),COLOR00FF00;  

股价趋势:=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);  

底部警戒:=10,COLORRED,LINETHICK2;  

底1:=CROSS(股价趋势,底部警戒);  

A1:=(2*CLOSE+HIGH+LOW)/4;  

A2:=LLV(LOW,27);  

A3:=HHV(HIGH,27);  

A4:=EMA((A1-A2)/(A3-A2)*100,13);  

A5:=EMA(0.618*REF(A4,1)+0.382*A4,3);  

底2:=CROSS(A4,A5)ANDA4<16;  

波底:=底1AND底2;  

{奔牛}  

VAR2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;  

VAR3:=SMA(SMA(VAR2,3,1),3,1)/28.57;  

VAR4:=EMA(VAR3,5);  

VAR5:=3*VAR3-2*VAR4;  

牛:=CROSS(VAR5,VAR3)ANDVAR3<2.1andc>O;  

{逃顶提示}  

VARA2:=LLV(LOW,10);  

VARA3:=HHV(HIGH,25);  

动力线:=EMA((CLOSE-VARA2)/(VARA3-VARA2)*4,4);  

{突破与破位}  

N:=19;  

VARB1:=HHV(HIGH,N);  

VARB2:=LLV(LOW,N);  

阻力线:=EMA((CLOSE-VARB2)/(VARB1-VARB2),21)-0.5;  

操作线:=EMA((CLOSE-VARB2)/(VARB1-VARB2),5)-0.5;  

突破:=CROSS(操作线,阻力线)AND阻力线<0.1;  

破位:=CROSS(阻力线,操作线)AND阻力线>0.25;  

{立桩成立判断}  

V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);  

T12:=V2>=1;  

T0:=BARSLAST(T12);  

L1:=REF(L,T0);  

H1:=REF(H,T0);  

L11:=MIN(REF(L,1),L);  

L10:=MIN(L11,REF(L,2));  

L21:=MAX(REF(L,1),L);  

L20:=MAX(L21,REF(L,2));  

T111:=(REF(V2>=1,3)ORREF(V2>=1,2)ORREF(V2>=1,1))AND  

((L10>L1ANDL20>H1)OR(L11>L1ANDL21>H1)OR(L>H1));  

T11:=T111ANDREF(T111,1)=0;  

{涨跌停}  

C3:=REF(C,1);  

涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);  

跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);  

{顶背离与底背离}  

LC:=REF(CLOSE,1);  

RSI:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);  

FF:=EMA(CLOSE,3);  

MA15:=EMA(CLOSE,21);  

顶背离:=CROSS(88,RSI);  

底背离:=CROSS(FF,MA15);  

{45度攻击}  

X1:=(C+L+H)/3;  

BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;  

EMA8:=EMA(C,8);  

T1:=FILTER(BB13>1ANDEMA(X1,13)>REF(EMA(X1,8),1),10);  

{获利盘提示}  

获利盘:=WINNER(C)*100;  

{彩色成交量柱线}  

VOLUME:VOL,VOLSTICK;  

MAVOL1:MA(VOLUME,5),COLORWHITE;  

MAVOL2:MA(VOLUME,35),COLORYELLOW;MAVOL3:MA(VOLUME,135),COLORGREEN;  

{V2:IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1),NODRAW,COLORRED;}  

STICKLINE(V2>=1,0,VOL*0.5,2,0),COLORYELLOW;  

STICKLINE(动力线>=3.2,0,VOL,1,0),COLOR238E23;  

STICKLINE(波底,0,VOL,2,0),COLORMAGENTA;  

DRAWTEXT(波底,VOL*0.8,'底'),COLORWHITE;  

DRAWICON(波底,VOL*1.1,5);  

STICKLINE(牛,0,VOL,2,0),COLORRED;  

DRAWTEXT(牛,VOL*1.15,'牛'),COLORWHITE;  

STICKLINE(突破,0,VOL,1,0),COLORBLUE;  

DRAWTEXT(突破,VOL*0.5,'突破'),COLORWHITE;  

DRAWICON(突破,VOL*1.2,1);  

STICKLINE(破位,0,VOL,0.5,0),COLORBROWN;  

DRAWTEXT(破位,VOL*0.5,'破位'),COLORWHITE;  

DRAWICON(破位,VOL*1.05,2);  

STICKLINE(T11,O,VOL,2,0),COLORFF00FF;  

STICKLINE(涨停,VOL*0.5,VOL,2.5,0),COLORLIRED;  

STICKLINE(涨停,VOL*0.5,VOL,0,0),COLORRED;  

STICKLINE(跌停,VOL*0.5,VOL,2.5,0),COLOR2F4F2F;  

STICKLINE(跌停,VOL*0.5,VOL,0,0),COLORBLACK;  

STICKLINE(顶背离,VOL*0.8,VOL,2.5,0),COLORGREEN;  

STICKLINE(底背离,0,VOL*0.2,3,0),COLOR7F017F;  

DRAWTEXT(T1,VOL*1.1,'∠'),COLOR007575;  

DRAWTEXT(获利盘>=75AND动力线>=3.2,VOL*1.1,'●'),COLORRED;  

DRAWTEXT(获利盘<75and动力线>=3.2,VOL*1.1,'●'),COLORGREEN;

image.png

每日公式解答:

股票公式编写要求:

昨日上影线光脚阳线今日下影线光头阳线的选股公式。

股票公式编写结果:

XG:REF(H,1)>REF(C,1) AND REF(C,1)>REF(O,1) AND REF(O,1)=REF(L,1) AND O>L AND C>O AND H=C;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。