通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 主图
VAR1:=EMA(EMA(CLOSE,13),13);控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;STICKLINE(控盘 0,控盘,0,1,1),COLOR00FF00;STICKLINE(控盘 REF(控盘,1)AND控盘 0,控盘,0,1,1),COLORFF00FF;无庄控盘:=控盘 0;STICKLINE(控盘 REF(控盘,1)AND控盘 0,控盘,0,1,1),COLOR0000FF;有庄控盘:=控盘 REF(控盘,1)AND控盘 0;VAR2:=100*WINNER(CLOSE*0.95);STICKLINE(控盘 REF(控盘,1)AND控盘 0,控盘,0,1,1),COLORFFFF00;出货:=控盘 REF(控盘,1)AND控盘 0;STICKLINE(VAR2 50ANDCOST(85) CLOSEAND控盘 0,控盘,0,1,1),COLOR00FFFF;高度控盘:VAR2 50ANDCOST(85) CLOSEAND控盘 0,COLOR00FFFF,LINETHICK2;A10:=CROSS(控盘,0);控盘B:=FILTER(IF(A10,1,0),5);{价格原码}JJ:=DYNAINFO(11);
{原码}P:=55;S:=8;M1:=3;财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10,COLORRED,LINETHICK2;神:=EMA(财,M1),COLORGREEN,LINETHICK1;DRAWBAND(财,RGB(255,0,0),神,RGB(0,100,50));{股价与偏离买卖条件}BTJ1:=(C-JJ)/JJ -0.005;BTJ11:=(C-JJ)/JJ -0.03;BTJ12:=LAST(JJ =REF(JJ,1),5,1)AND(C-JJ)/JJ 0.005;STJ1:=(C-JJ)/JJ 0.005;{控盘买卖条件}STJ01:=控盘 REF(控盘,1)AND控盘 0.5;STJ02:=控盘 0;BTJ2:=控盘 REF(控盘,1)AND控盘 -0.2;BTJ22:=控盘 REF(控盘,1)AND控盘 0;{波段买卖条件}BTJ3:=CROSS(财,神)AND财 -0.3;
BTJ32:=CROSS(财,神)AND财 -0.1;STJ31:=CROSS(神,财);STJ32:=CROSS(神,财)AND财 1.618;{以下为信号};BTJ81:=FILTER(BTJ1ANDBTJ2ANDBTJ3,13);BTJ811:=FILTER(BTJ11ANDBTJ2ANDBTJ3,13);BTJ82:=FILTER(BTJ12ANDBTJ22ANDBTJ32,13);DRAWICON(BTJ82,神,23);{追买};DRAWICON(BTJ81ANDTIME 10,神,27);{};DRAWICON(BTJ811ANDTIME 10,神,26);{有庄};DRAWTEXT(BTJ81,神, ),COLORRED;DRAWTEXT(BTJ811,神*1.2, 有庄 ),COLORWHITE;STJ81:=FILTER(STJ1ANDSTJ01ANDSTJ31,13);DRAWICON(STJ81,神,19);STJ82:=FILTER(STJ02ANDSTJ32,13);DRAWICON(STJ82,神,15);STJ83:=STJ81ANDSTJ82;DRAWTEXT(STJ83,神, 必卖 ),COLOR00FF00;
EMA13:=EMA(C,13),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
EMA34:=EMA(C,34),COLORFF00FF;
EMA60:=MA(C,60),COLORFFCC66;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR =2099ANDMONTH 2,0,1);
VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,4);
:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;
DRAWTEXT(CROSS(散户,庄家)AND散户 30,L-0.05, ←低吸 ),COLORLIRED;
DRAWTEXT(CROSS(庄家,散户)AND散户 70,H+0.05, ←高抛 ),COLORGREEN;
DRAWICON(CROSS(散户,庄家)AND散户 30,L-0.05,1);
DRAWICON(CROSS(庄家,散户)AND散户 70,H+0.05,2);
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);
卖出:=IF(VARA 0ANDCROSS(VARC,VARA),90,100);
DRAWICON(卖出 0,H+0.05,2);买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
B1:IF(CROSS(买线,卖
线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;
S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELL
OW;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOS
E,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
S2:=IF(VC 20ANDFILTER(VC
REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;
A0:=(L+H+C*2)/4;
A1:EMA(A0,14)COLORBLUE,LINETHICK2;
A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
看多:IF(A1X =0AND
BARSLAST(CROSS(A1X,0)) 0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL
),COLORMAGENTA{,LINETHICK2};
:IF(A1X 0AND
BARSLAST(CROSS(0,A1X)) 0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL
),COLORCYAN,{LINETHICK2};
买入持股:IF(A1X =0,A1,DRAWNULL)COLORRED,LINETHICK3;
卖出空仓:IF(A1X 0ANDA2X 0,A1,DRAWNULL)COLORGREEN,LINETHICK3;
STICKLINE(CROSS(A1X,0),H,L,0,0),COLOR9933FF;
STICKLINE(CROSS(A1X,0),C,O,3,0),COLOR0000CC;
STICKLINE(CROSS(A1X,0),C,O,1,0),COLOR0033FF;
STICKLINE(CROSS(0,A1X),L,H,0,0),COLOR66CC33;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,150);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
DDKP:=EMA((WINNER(CLOSE)*70),D1);
WWKP:=EMA(((WINNER((CLOSE*1.1))-WINNER((CLOSE*0.9)))*
80),D1);
主力持仓:WINNER(CLOSE*0.9)*8*M1,COLORCYAN,DOTLINE,LINETHICK2;
主力控盘:((DDKP/(DDKP+WWKP))*100),LINETHICK2,COLORYELLOW;
启动点:=MACDREF(MACD,1)AND
REF(MACD,1) REF(MACD,2)
ANDREF(MACD,2) REF(MACD,3)
ANDREF(MACD,3) REF(MACD,4);
顶:90,LINETHICK2,COLORRED;
风险:80,,COLORYELLOW;平衡:50,COLORGREEN;
安全:20,COLOR00CCFF;{M}
底:0,LINETHICK2,COLORWHITE;
DRAWBAND(底,DRAWNULL,主力持仓,RGB(0,255,255));
DRAWICON(启动点,主力控盘,1);
N:=10;
JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
QJ5:=QJ1+QJ2;QJ6:=QJ3+QJ4;DD:=(QJ5-QJ6)/(QJ5+QJ6)*100;
DDZ:DD*17,LINETHICK1;
DDZ1:DD*13,LINETHICK1;
DRAWBAND(DDZ1,RGB(0,24,224),DDZ,RGB(255,0,0));
庄家资金
n:=3;
VAR1:=1.13;
VAR3:=LLV(HIGH,318);
VAR4:=100*(CLOSE-VAR3)/VAR3*VAR1;
VAR5:=REF(LLV(CLOSE,610),1)*VAR1;
VAR6:=REF(HHV(CLOSE,610),1)*VAR1;
VAR7:=100*(CLOSE-VAR5)/(VAR6-VAR5)*VAR1;
VAR8:=(CLOSE-LLV(CLOSE,880))/(HHV(CLOSE,880)-LLV(CLOSE,880))*100*VAR1
;
VAR9:=(CLOSE-LLV(CLOSE,318))/(HHV(CLOSE,318)-LLV(CLOSE,318))*100*VAR1
;
VARA:=(CLOSE-LLV(LOW,880))/(HHV(HIGH,880)-LLV(LOW,880))*100*VAR1;
VARB:=(CLOSE-LLV(LOW,318))/(HHV(HIGH,318)-LLV(LOW,318))*100*VAR1;
VARC:=EMA(100*(CLOSE-LLV(LOW,144))/(HHV(HIGH,144)-LLV(LOW,144)),5)/4*
VAR1;
VARD:=IF(VARC 13.16,VARC,0)*VAR1;
VARE:=VARC 1*VAR1;
VARF:=VARD*VAR1;
VAR10:=VAR4 0ANDVAR7
VAR11:=1;
VAR12:=(HIGH+LOW+CLOSE*2)/4*VAR11;
VAR13:=EMA(VAR12,34);
VAR14:=STD(VAR12,34);
VAR15:=((VAR12-VAR13)/VAR14*100+200)/4*VAR11;
VAR16:=(EMA(VAR15,89)-25)*1.56*VAR11;
VAR17:=EMA(VAR16,5)*1.22*VAR11;
VAR18:=EMA(VAR17,3)*VAR11;
VAR19:=3*VAR17-2*VAR18*VAR11;
VAR1A:=IF(CROSS(VAR19,VAR17)ANDCROSS(VAR19,VAR18)AND
CROSS(VAR17,VAR18),1,0);
VAR1B:=IF(CROSS(VAR17,VAR19)ANDCROSS(VAR18,VAR19)AND
CROSS(VAR18,VAR17),1,0);
买点:=IF(FILTER(VAR8=0ANDVAREANDVAR10ANDVAR1A,5)=1,10,0);
卖点:=IF(FILTER(VAR8=100ANDVARFANDVAR1B,5)=1,10,0);
VAR1C:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/
4*VAR1;
VAR1D:=EMA(CLOSE,2)-EMA(CLOSE,89)*VAR1;
VAR1E:=EMA(VAR1D,21)*VAR1;
VAR1F:=2*(VAR1D-VAR1E)*10*VAR1;
VAR20:=POW(VAR1F,3)*0.1+POW(VAR1F,2)*VAR1;
VAR21:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR22:=EMA(VAR21*0.97,3)*VAR1;
VAR23:=(HIGH+LOW+CLOSE)/3*VAR1;
VAR24:=(VAR23-MA(VAR23,14))/(0.015*AVEDEV(VAR23,14))*VAR1;
VAR25:=IF(VAR1F 0.013,VAR20,0)/34*VAR1;
拉升资金:VAR25*5,COLORRED,LINETHICK2;
VAR26:=EMA(CLOSE,3)-EMA(CLOSE,144);
VAR27:=EMA(VAR26,55);
VAR28:=2*(VAR26-VAR27);
VAR29:=POW(VAR28,3)*0.1+POW(VAR28,1);
VAR2A:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR2B:=EMA(VAR2A*0.97,3);
VAR2C:=(HIGH+LOW+CLOSE)/3;
VAR2D:=(VAR2C-MA(VAR2C,14))/(0.015*AVEDEV(VAR2C,14));
主力资金:IF(VAR28 0.01,VAR29*200,-100),LINETHICK2,COLORYELLOW;
STICKLINE(VAR25 0,0,拉升资金,2,1),COLORRED;
N1:=13;
N2:=5;
MTM:=C-REF(C,1);
ZLGJ:=MA(100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1),2),COLORWHI
TE;
MAZL:=MA(MA(ZLGJ,N2),3),COLORYELLOW;
DRAWICON(CROSS(ZLGJ,MAZL)ANDMA(C,5) =REF(MA(C,5),1)AND
MA(C,2) =REF(MA(C,2),1),MA(拉升资金,5),9);
DRAWICON(CROSS(MAZL,ZLGJ)ANDMA(C,5) REF(MA(C,5),1),MA(拉升资
金,5),2);
A1:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100;
BL:=VOL/CAPITAL*100;
STICKLINE(A1 =0,0,A1*50,1,1),COLORYELLOW;
A1Q:=34;
实体比例:=(CLOSE-OPEN)/REF(CLOSE,1);
冲击系数:=MA(实体比例,A1Q),COLORRED;
回头线:=MA(MA(冲击系数,2),2),COLORYELLOW;
DRAWICON(CROSS(冲击系数,回头线)ANDMA(C,5) =REF(MA(C,5),1),MA(拉升资
金,5),1);
CY赋值:(收盘价*(手)的3日指数移动平均/成交量(手)的3日指数移动平均+收盘价*成交量(手)的6日指数移动平均/成交量(手)的6日指数移动平均+收盘价*成交量(手)的12日指数移动平均/成交量(手)的12日指数移动平均+收盘价*成交量(手)的24日指数移动平均/成交量(手)的24日指数移动平均)/4的18日指数移动平均
支撑赋值:1.06*CY,线宽为2
MA5赋值:收盘价的5日简单移动平均
上轨赋值:薛斯通道的LUP
多空赋值:(收盘价的3日指数移动平均+收盘价的6日指数移动平均+收盘价的12日指数移动平均+收盘价的24日指数移动平均)/4
赋值:收盘价 1日前的收盘价*1.098 AND 收盘价=最高价
牛二1赋值:1日前的统计7日中满足MA5 上轨的天数 =1AND(MA5 1日前的MA5ORC 1日前的收盘价ORC 开盘价)AND 收盘价上穿MA5 AND 收盘价 支撑 AND MA5 1日前的MA5 AND 收阳线AND 收盘价 1日前的收盘价*1.015
牛二2赋值:1日前的统计8日中满足MA5 上轨的天数 =1ANDCROSS(收盘价,MA5) AND MA5 1日前的MA5 AND 收阳线AND 收盘价 1日前的收盘价*1.015
牛二3赋值:1日前的统计6日中满足最近3日一直存在涨停ANDC 开盘价的天数 =1AND(MA5 1日前的MA5ORC 1日前的收盘价ORC 开盘价)AND 收盘价上穿MA5 AND 收盘价 支撑 AND MA5 1日前的MA5 AND 收阳线AND 收盘价 1日前的收盘价*1.015
输出牛二:牛二1 OR 牛二2 OR 牛二3,画洋红色,线宽为2
当满足条件牛二时,在0.58位置书写文字,画黄色
当满足条件牛二时,在牛二位置画9号图标
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) CLOSEANDREF(RSV1,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) CLOSEANDREF(RSV3,SV4+1) RSV3ANDCROSS(RSV4,RSV3);
动顶背:IF(SV4A,RSV3,DRAWNULL),COLOR00FF00;
DRAWTEXT(SV4A,RSV3, ─动顶背 ),COLOR00FF00;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(VAR3*10,3);
VAR5:=LLV(LOW,13);
VAR6:=HHV(VAR4,13);
VAR7:=IF(barpos 34,1,0);
VAR8:=EMA(IF(LOW =VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8 100,100,VAR8);
{吸筹:VAR9,LINETHICK0,COLOREE00EE;}
STICKLINE(VAR9 -120,0,VAR9,8,1);
STICKLINE(VAR9 1AND KDJ.J REF( KDJ.J ,1)AND
REF( KDJ.J ,1) REF( KDJ.J ,2),0,VAR9,8,0),COLORRED;
STICKLINE(VAR9 0.1ANDVAR9 1AND KDJ.J REF( KDJ.J ,1)AND
REF( KDJ.J ,1) REF( KDJ.J ,2),0,VAR9,8,0),COLOR00FFFF;
ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力估算}
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//散户筹码估算}
ZSHTL:=SHCM/(ZLCM+SHCM)*200;{//散户套牢筹码比率}
ZZLKP:=ZLCM/(ZLCM+SHCM)*200;{//主力控盘筹码比率}
ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}
ZZNTS:=BARSLAST(ZSHTL 90ANDREF(ZSHTL,1) {//走牛天数}
ZSHJJ:=EMA(ZSHTL,89);{//散户警戒}
ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}
ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}
SH8:=EMA(ZSHTL,8);
DKB:=IF(ZZLKP-REF(ZZLKP,1) ZSHTL-REF(ZSHTL,1),1,0);
散户套牢线1:=INTPART(ZSHTL),COLORFFEEBB,LINETHICK2;
主力控盘线1:=INTPART(ZZLKP),COLOR4D4DFF,LINETHICK2;
DRAWBAND(主力控盘线1,RGB(0,255,255),散户套牢线1,RGB(50,50,50));
{柱状线}
STICKLINE(((主力控盘线1 REF(主力控盘线1,1))AND(主力控盘线1 100)),主力控盘线
1,散户套牢线1,2,0),COLOR8000FF;
散:INTPART(ZSHTL),COLORFFEEBB,LINETHICK2;
主力:INTPART(ZZLKP),COLOR4D4DFF,LINETHICK2;
{资金流入线:ZJLRQD,,COLOR7F00FF,LINETHICK2;
资金强弱线:15,COLORFF80FF,LINETHICK2,CROSSDOT;
控盘临界线:55,COLORFF937F,LINETHICK2,CROSSDOT;
强势控盘线:75,COLORFF3399,LINETHICK2,CROSSDOT;};
{主力监控}
B1:=(HHV(H,35)-C)/(HHV(H,35)-LLV(LOW,35))*100-35;
B2:=SMA(B1,35,1)+100;
B3:=(C-LLV(L,35))/(HHV(H,35)-LLV(L,35))*100;
B4:=SMA(B3,3,1);
B5:=SMA(B4,3,1)+100;
B6:=B5-B2;
控盘程度:(IF(B6 1,B6-1,0))*2.5,COLORRED,LINETHICK2;
控盘度:100,COLORWHITE;
{柱状线}
控盘上:IF(控盘程度 REF(控盘程度,1),控盘程度,DRAWNULL),
STICK,COLORYELLOW,LINETHICK1;
控盘下:IF(控盘程度 REF(控盘程度,1),控盘程度,DRAWNULL),
STICK,COLORFF9900,LINETHICK1;
进:IF(控盘程度 REF(控盘程度,1),5,DRAWNULL),CIRCLEDOT,COLORYELLOW;
出:IF(控盘程度 REF(控盘程度,1),5,DRAWNULL),CIRCLEDOT,COLORFF9900;
{SAR}
持币:IF(SAR(10,2,20) =H,100,DRAWNULL),CIRCLEDOT,COLORBLUE;
持股:IF(SAR(10,2,20) =L,100,DRAWNULL),CIRCLEDOT,COLORRED;
公式编写要求:
求把“庄家送酒”副图改成通达信公式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;AA:=CROSS(VAR5,VAR3)ANDVAR3 2.1ANDC VAR6:=(2*CLOSE+HIGH+LOW)/4;VAR7:=LLV(LOW,13);VAR8:=HHV(HIGH,13);VAR9:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13);VARA:=EMA(0.667*REF(VAR9,1)+0.333*VAR9,2);多:VAR9,COLORRED,POINTDOT;空:EMA(0.382*REF(VAR9,2)+0.618*VAR9,12),COLOR00FF00;STICKLINE(VAR9 VARA,VAR9,VARA,6,0),COLORWHITE;STICKLINE(VAR9 =VARA,VAR9,VARA,6,0),COLORFFCC66;{啤酒瓶画图源码}STICKLINE(AA,0,30,40,1),COLORYELLOW;STICKLINE(AA,16,29,38,0),COLORGREEN;STICKLINE(AA,1,14,38,0),COLORGREEN;STICKLINE(AA,15,15,40,1),COLORYELLOW;STICKLINE(AA,30,50,10,0),COLORYELLOW;STICKLINE(AA,53,55,10,1),COLORRED;STICKLINE(AA,57,59,10,1),COLORRED;STICKLINE(AA,61,63,10,1),COLORRED;STICKLINE(AA,65,67,10,1),COLORRED;STICKLINE(AA,69,75,12,0),COLORFFCCCC;DRAWTEXT(AA,85, 干杯 ),COLORYELLOW;DRAWTEXT(AA,26, 五粮液 ),COLORYELLOW;{DRAWTEXT(AA,12, XO ),COLORYELLOW;};
公式编写方法:
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;
AA:CROSS(VAR5,VAR3)ANDVAR3 2.1ANDC