通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信黄金倍量柱选股指标公式
SHORT:=12;LONG:=26;M:=9;
DIFF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIFF,M);
MACD:2*(DIFF-DEA),COLORSTICK,COLOR5454FF;
DD:=C=HHV(C,180);
EE:=DEA<REF(DEA,1)ANDREF(DEA<REF(DEA,1),1)=1;
CC:=C>REF(C,1)ANDREF(C>REF(C,1),1)=1;
上升背离:(CCANDEE)*DEA,COLOR00FFFF;
顶背离:(DDANDEEANDDEA<HHV(DEA,180))*DEA,STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:=DEA>REF(DEA,1)ANDREF(DEA>REF(DEA,1),1)=1;
LL:=C<REF(C,1)ANDREF(C<REF(C,1),1)=1;
下降背离:(LLANDGG)*DEA,COLORMAGENTA;
底背离:(FFANDGGANDDEA>LLV(DEA,180))*DEA,STICK,LINETHICK3,COLORRED;
MM:=IF(MACD<0,MACD,0);
JJ:=MM>REF(MM,1);
ZZ:=REF(JJ,1)=1;
介入区:(JJANDZZ)*DEA,POINTDOT,COLORYELLOW;{MACD蓝柱缩短—指今日比昨天短}
STICKLINE(介入区=DEA,DEA,DIFF,0.5,1),COLORYELLOW;
DRAWTEXT(CROSS(DIFF,DEA),0,'金↗'),COLORYELLOW;
DRAWTEXT(CROSS(DEA,DIFF),0,'死↘'),COLORFFFF00;
VAR1:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));
买盘:=IF((CLOSE>OPEN),(VAR1*(HIGH-LOW)),IF((CLOSE<OPEN),(VAR1*((HIGH-OPEN)+(CLOSE-LOW))),(VOL/2)));
卖盘:=IF((CLOSE>OPEN),(0-(VAR1*((HIGH-CLOSE)+(OPEN-LOW)))),IF((CLOSE<OPEN),(0-(VAR1*(HIGH-LOW))),(0-(VOL/2))));
买卖差:=(买盘+卖盘);
STICKLINE((买卖差<0),0,买卖差,3,0),COLOR33FF33;
量比:=(VOL/MA(VOL,5));
JX1:=BARSSINCE(买盘);
JY1:=IF(((121>JX1)AND(JX1>0)),JX1,120);
JY2:=IF(((4>JX1)AND(JX1>0)),JX1,3);
VAR30:=MA(VOL,JY2);
神比:=(买盘/VAR30);
鬼比:=(卖盘/VAR30);
VAR2:=(HIGH-LOW);
VAR3:=ABS((OPEN-CLOSE));
VAR4:=(HIGH-IF((CLOSE>OPEN),CLOSE,OPEN));
VAR5:=(IF((CLOSE>OPEN),OPEN,CLOSE)-LOW);
VAR6:=((VAR3/VAR2)*VOL);
VAR7:=((VAR4/VAR2)*VOL);
VAR8:=((VAR5/VAR2)*VOL);
VAR9:=IF(((VOL/CAPITAL)>0.001),1,EXP(ABS(LOG(((VOL/CAPITAL)*100)))));
VARA:=(((CLOSE-MA(CLOSE,5))/MA(CLOSE,5))*100);
VARB:=(((MA(CLOSE,5)>MA(CLOSE,10))AND(MA(CLOSE,10)>MA(CLOSE,30)))AND(MA(CLOSE,30)>MA(CLOSE,60)));VARC:=((MA(CLOSE,5)<MA(CLOSE,10))AND(MA(CLOSE,10)<MA(CLOSE,30)));
VARD:=REF(CLOSE,1);
VARE:=((SMA(MAX((CLOSE-VARD),0),6,1)/SMA(ABS((CLOSE-VARD)),6,1))*100);
DRAWTEXT(((DATE>700101)ANDCROSS(84,VARE)),HIGH,'■卖出'),COLORF2A3A4;
VAR40:=((IF((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE>OPEN)),VAR6,买盘)+买盘)/2);
VAR41:=((IF(((VAR7>VAR6)AND(VAR7>VAR8)),VAR7,买盘)+买盘)/2);
VAR42:=((IF(((VAR8>VAR6)AND(VAR8>VAR7)),VAR8,买盘)+买盘)/2);
VAR50:=((IF((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE<OPEN)),VAR6,卖盘)+卖盘)/2);
三日上攻:=MA((((VAR40+VAR41)+VAR42)/3),JY2);
三日下攻:=MA(VAR50,JY2);
多头:STICKLINE((CLOSE>MA(CLOSE,30)),0,VOL,3,1),COLOR0000FF;
空头:STICKLINE((CLOSE<MA(CLOSE,30)),0,VOL,3,1),COLOR00FF00;
STICKLINE((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE>OPEN)),0,VAR6,2,0),COLOR00FFFF;
STICKLINE((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE<OPEN)),0,VAR6,2,0),COLORFF0000;
STICKLINE(((VAR8>VAR6)AND(VAR8>VAR7)),0,VAR8,2,0),COLORFFFFFF;
STICKLINE(((VAR7>VAR6)AND(VAR7>VAR8)),0,VAR7,2,0),COLORFF00FF;
STICKLINE((VOL>(MA(VOL,5)*2.5)),0,VOL,1,0);
STICKLINE((买盘>0),买盘,0,1,0),COLOR0000FF;
上攻均量:=MA(买盘,JY1);
下攻均量:=MA(卖盘,JY1);
DRAWTEXT(((((((((VAR7>VAR6)AND(VARA>2))AND(VAR9>VAR8))AND(CLOSE>MA(CLOSE,5)))AND(CLOSE>MA(CLOSE,30)))AND(HIGH>MA(CLOSE,60)))AND(VOL>MA(VOL,5)))AND(VAR7>=MA(VOL,5))),VOL,'▼出货');
DRAWTEXT(((((((VAR8>VAR6)AND(VAR8>VAR7))AND(VARA<(0-2)))AND(CLOSE<MA(CLOSE,30)))AND(VAR8<(MA(VOL,5)/2)))AND(MA(VOL,5)<MA(VOL,10))),VOL,'●低进');
DRAWTEXT((((((VAR6>(MA(VOL,5)*2))AND(VAR6>=VAR7))AND(VAR6>=VAR8))AND(CLOSE>OPEN))OR((VOL>(MA(VOL,5)*3))ANDVARB)),VOL,'◆强势');
DRAWTEXT((((((量比>1)AND((买盘/三日上攻)>1.58))ANDIF((三日上攻>上攻均量),(三日上攻>三日下攻),(三日上攻>REF(三日上攻,1))))AND(三日下攻<REF(三日下攻,1)))AND((((CLOSE-REF(CLOSE,3))/REF(CLOSE,3))*100)<14)),(买盘*1.3),'★参与'),COLOR99FF00;
换手率:=((VOL/CAPITAL)*100);
DRAWTEXT((((VOL/REF((SUM(VOL,5)/5),1))>=2)AND(换手率>1)),(VOL*1.1),'●量变'),COLOR00FFFF;
RQ1:=2010;
RQ2:=1;
RQ3:=1;
RQA:=2010;
RQB:=1;
RQC:=1;
HF:=0;
XG:=0;
GF:=0;
P:=3;
P1:=3;
RQG:=(RQ1-1900)*10000+RQ2*100+RQ3;
AH:=REF(H,BARSLAST(DATE<=RQG)),NODRAW;
高价:IF(DATE>=RQGANDXG>=1,AH,NULL),COLOR00FFFF;
RQD:=(RQA-1900)*10000+RQB*100+RQC;
DJ:=REF(L,BARSLAST(DATE<=RQD)),NODRAW;
低价:IF(DATE>=RQDANDXG>=1,DJ,NULL),COLORFFFF00;
FU:=C-低价;
低到当前幅度:FU/低价*100,NODRAW,COLOR00FFFF;
FUGA:=高价-低价;
高到低价幅度%:FUGA/高价*100,NODRAW,COLOR00FFFF;
AS:=(O+H+L+C)/4;
SY:=EMA(AS,P);
BL:=EMA(AS,17);
FILLRGN(SY>BL,BL,SY,RGB(139,10,10));
FILLRGN(SY<BL,BL,SY,RGB(0,100,0));
STICKLINE1(C>=O,LOW,HIGH,0,0),COLOR0000FF;
STICKLINE1(C>=O,CLOSE,OPEN,2.8,1),COLOR1020EE;
STICKLINE1(C<=O,LOW,HIGH,0,0),COLORFF8800;
STICKLINE1(C<=O,CLOSE,OPEN,2.8,0),COLORFFCC00;
低价A:IF(DATE>=RQDANDGF>=1,DJ*1.03,NULL),COLOR999999;
低价B:IF(DATE>=RQDANDGF>=1,DJ*1.05,NULL),COLOR999999;
低价C:IF(DATE>=RQDANDGF>=2,DJ*1.08,NULL),COLOR999999;
低价D:IF(DATE>=RQDANDGF>=2,DJ*1.13,NULL),COLOR999999;
低价E:IF(DATE>=RQDANDGF>=3,DJ*1.18,NULL),COLOR999999;
低价F:IF(DATE>=RQDANDGF>=3,DJ*1.25,NULL),COLOR999999;
低价G:IF(DATE>=RQDANDGF>=4,DJ*1.34,NULL),COLOR999999;
低价H:IF(DATE>=RQDANDGF>=4,DJ*1.37,NULL),COLOR999999;
DRAWTEXT(ISLASTBARANDGF>=1,DJ*1.03,'?%'),COLOR208FFF;
DRAWTEXT(ISLASTBARANDGF>=1,DJ*1.05,'?%'),COLOR208FFF;
DRAWTEXT(DATE<=RQDANDGF>=2,低价C,'?%'),COLOR208FFF;
DRAWTEXT(DATE<=RQDANDGF>=2,低价D,'?%'),COLOR208FFF;
DRAWTEXT(DATE<=RQDANDGF>=3,低价E,'?%'),COLOR208FFF;
DRAWTEXT(DATE<=RQDANDGF>=3,低价F,'?%'),COLOR208FFF;
DRAWTEXT(DATE<=RQDANDGF>=3,低价G,'?%'),COLOR208FFF;
DRAWTEXT(DATE<=RQDANDGF>=3,低价H,'?%'),COLOR208FFF;
STICKLINE1(DATE<=RQG,低价,高价,0,0),COLOR00FF00;
STICKLINE1(DATE<=RQD,高价,低价,0,0),COLORFF00FF;
Q1:=(低价+(高价-DJ)*0.191)/高价;
Q2:=(低价+(高价-DJ)*0.382)/高价;
Q3:=(低价+(高价-DJ)*0.50)/高价;
Q4:=(低价+(高价-DJ)*0.618)/高价;
Q5:=(低价+(高价-DJ)*0.809)/高价;
Q6:=(低价+(高价-DJ)*0.333)/高价;
Q7:=(低价+(高价-DJ)*0.667)/高价;
ZH:=IF(HF,DATE<=RQG,DATE<=RQD),NODRAW;
高价A:IF(DATE>=RQDANDXG>=2,AH*Q1,NULL),COLOR007777,DOT;
高价B:IF(DATE>=RQDANDXG>=2,AH*Q2,NULL),COLOR007777,DOT;
高价C:IF(DATE>=RQDANDXG>=2,AH*Q3,NULL),COLOR007777,DOT;
高价D:IF(DATE>=RQDANDXG>=2,AH*Q4,NULL),COLOR007777,DOT;
高价E:IF(DATE>=RQDANDXG>=2,AH*Q5,NULL),COLOR007777,DOT;
高价F:IF(DATE>=RQDANDXG>=2,AH*Q6,NULL),COLOR007700,LINETHICK3;
高价G:IF(DATE>=RQDANDXG>=2,AH*Q7,NULL),COLOR007700,LINETHICK3;
DRAWNUMBER1(ZH,高价*Q1*1.008,高价*Q1,2),COLOR00FFFF;
DRAWNUMBER1(ZH,高价*Q2*1.008,高价*Q2,2),COLOR00FFFF;
DRAWNUMBER1(ZH,高价*Q3*1.008,高价*Q3,2),COLOR00FFFF;
DRAWNUMBER1(ZH,高价*Q4*1.008,高价*Q4,2),COLOR00FFFF;
DRAWNUMBER1(ZH,高价*Q5*1.008,高价*Q5,2),COLOR00FFFF;
DRAWNUMBER1(ZH,高价*Q6*0.999,高价*Q6,2),COLOR00FF00;
DRAWNUMBER1(ZH,高价*Q7*1.01,高价*Q7,2),COLOR00FF00;
SYA:EMA(AS,P1),LINETHICK2,COLORCCAACC;
LJ2:=(C-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
LJF2:=(EMA(LJ2,3));
低:=18;
DI:=EMA(CLOSE,10)-EMA(CLOSE,22);
XG1:=CROSS(LJF2,低);
DRAWICON(XG1,L,11);
DRAWNUMBER1(ISLASTBARANDSYA,SYA*1.005,SYA,2);
BLS:=BL+2.58*STDP(C,20);
BL2:=BL+1.96*STDP(C,20);
DRAWICON(CROSS(H,BLS),H,2);
DRAWICON(CROSS(H,BL2),H*1.000,8);
DRAWNUMBER1(ISLASTBARANDBL,BL*1.005,BL,2);
XGM:=CROSS(SY,BL);
DRAWICON(CROSS(C,BL)ANDBL>REF(BL,1)ANDDI>REF(DI,1),L,9);
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
GB:IF(RSI1>76,H*1.001,NULL),CIRCLEDOT,LINETHICK3,COLORFFFF00;
GBB:IF(RSI1>80,H*1.002,NULL),CROSSDOT,LINETHICK3,COLOR0000FF;
文华多空彩带主图+倍量操盘线副图指标源码
副图源码:
N4:=5;
VAR1Q:4*SMA((CLOSE-LLV(LOW,N4))/(HHV(HIGH,N4)-LLV(LOW,N4))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,N4))/(HHV(HIGH,N4)-LLV(LOW,N4))*100,5,1),3.2,1),COLORRED;
VAR2Q:8,COLORGREEN;
上升在即:=IF(CROSS(VAR1Q,VAR2Q),40,0),STICK,COLORRED;
STICKLINE(上升在即,0,-20,1,0),COLORRED;
专吸庄血:=IF(VAR1Q<=8,-10,0),STICK,COLORBLUE,LINETHICK4;
DRAWTEXT(CROSS(VAR1Q,VAR2Q),-20,'买'),COLORRED;
真阳或假阴:=C>OORC>REF(C,1);
收阳:=REF(真阳或假阴,3);
倍数:=1.9;
倍量:VOL>=REF(V,1)*倍数AND(IF(C<O,C>REF(C,1),1)),COLORYELLOW,NODRAW;
VOL1:=VOL*0.7;
STICKLINE(倍量,0,20,1.5,0),COLORYELLOW;
STICKLINE(倍量,0,35,0.5,0),COLORRED;
倍量1:=REF(倍量,3);
三日不破:=LLV(C,3)>=REF(L,3);
倍量将军柱:倍量1AND三日不破AND收阳;
CV:=CLOSE;
BBIBOLL:=(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4;
UPR:=BBIBOLL+6*STD(BBIBOLL,11);
DWN:=BBIBOLL-6*STD(BBIBOLL,11);
QJJ:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
XVL:=(IF(CLOSE>OPEN,QJJ*(HIGH-LOW),IF(CLOSE<OPEN,QJJ*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-QJJ*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-QJJ*(HIGH-LOW),0-VOL/2)));
HSL:=(XVL/3)/1.15;
攻击:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22));
LLJX:=EMA(攻击,3);
B1A:=IF(SUM(LLJX,1)>REF(MA(SUM(LLJX,1),1),1),SUM(LLJX,1),NULL);
B2:=IF(SUM(LLJX,2)>REF(MA(SUM(LLJX,2),1),1),SUM(LLJX,2),NULL);
B3:=IF(SUM(LLJX,3)>REF(MA(SUM(LLJX,3),1),1),SUM(LLJX,3),NULL);
B4:=IF(SUM(LLJX,4)>REF(MA(SUM(LLJX,4),1),1),SUM(LLJX,4),NULL);
B5:=IF(SUM(LLJX,5)>REF(MA(SUM(LLJX,5),1),1),SUM(LLJX,5),NULL);
B6:=IF(SUM(LLJX,6)>REF(MA(SUM(LLJX,6),1),1),SUM(LLJX,6),NULL);
B7:=IF(SUM(LLJX,7)>REF(MA(SUM(LLJX,7),1),1),SUM(LLJX,7),NULL);
B8:=IF(SUM(LLJX,8)>REF(MA(SUM(LLJX,8),1),1),SUM(LLJX,8),NULL);
B9:=IF(SUM(LLJX,9)>REF(MA(SUM(LLJX,9),1),1),SUM(LLJX,9),NULL);
B10:=IF(SUM(LLJX,10)>REF(MA(SUM(LLJX,10),1),1),SUM(LLJX,10),NULL);
XG:=B1AANDB2ANDB3ANDB4ANDB5ANDB6ANDB7ANDB8ANDB9
ANDB10AND(CLOSE-OPEN)>=(UPR-BBIBOLL)ANDV/REF(V,1)>=1.9;
DRAWICON(XG,-5,34);
VAR1I:=(C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100;
VAR2I:=(C-LLV(L,10))/(HHV(H,10)-LLV(L,10))*100;
VAR3I:=(C-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100;
VAR4I:=DMA(SMA((VAR1I+VAR2I+VAR3I)/3,2,1),3);
K0:SMA(VAR4I,2,1),COLORRED,LINETHICK1;
M0:SMA(K0,2,1),COLORFFFFFF;
DRAWICON(CROSS(K0,M0),K0-1,1);
DRAWICON(CROSS(M0,K0),M0-1,2);
红买青卖:38,COLOR0000FF,LINETHICK2;
红买:IF(K0>M0,38,NULL),COLOR0000FF,LINETHICK1;
青卖:IF(K0<M0,38,NULL),COLOR00FF00,LINETHICK1;
DF:=3;
N1:=12;
RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
K:=SMA(RSV,DF,1);
D:=SMA(K,DF,1);
KK:=SMA(RSV,DF,1);
DD1:=SMA(K,DF,1);
N:=KK+DD1;
GWGD:=N<REF(N,1)ANDREF(N,1)>=160ANDREF(N,1)>=REF(N,2);
HL:165,COLOR007700,LINETHICK1;
操盘B:N,COLORFF00FF,LINETHICK1;
[源码注释]通达信公式动态翻译结果
输出XG:上次最高价距今天数<=30 AND 最低价=1日前的上次最高价距今天数日前的最高价
每日通达信公式解答:
编写要求:
60天换手率在300以上选股公式
公式在线网解答:
SUM(VOL/CAPITAL*100,60)>300;
或者
NHS:SUM(V,60)/CAPITAL*100>300;
评论(0)