ema指标源码(三色量柱指标公式?)
1. 三色量柱指标公式?
公式:Y1:=LLV(L,17);
Y2:=SMA(ABS(L-REF(L,1)),17,1);
Y3:=SMA(MAX(L-REF(L,1),0),17,2);
Q:=-(EMA(IF(L<=Y1,Y2/Y3,-3),1));
STICKLINE(CROSS(Q,0),15,0,4,0), , COLORYELLOW;
强拉升: IF(CROSS(Q,0),1,0),COLORYELLOW;
Q1:= (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100, , COLOR00FF00,LINETHICK2;
STICKLINE(CROSS(Q1,-24),20,0,4,0), , COLORMAGENTA;
加强拉升: IF(CROSS(Q1,-24),1,0),COLORMAGENTA;
VAR2:=EXPMA(EXPMA(EXPMA((2*CLOSE+HIGH+LOW)/4,4),4),4);
天:=( MA((VAR2-REF(VAR2,1))/REF(VAR2,1)*100,2));
地:=( MA((VAR2-REF(VAR2,1))/REF(VAR2,1)*100,1));
STICKLINE(地>天 AND 地<0,10,0,1,0),COLORRED;
开始拉升:STICKLINE(地>天 AND 地<0,10,0,1,0)=1,COLORRED;
2. 拉升在即指标公式?
本人精通编程,会写会改,拉升在即公式如下:
VAR1:=EMA(SMA((CLOSE-LLV(LOW,19))/(HHV(HIGH,19)-LLV(LOW,19))*100,8,1),3);
STICKLINE(VAR1>20 AND VAR1<80,VAR1,VAR1,10,1),COLORRED;
STICKLINE(VAR1<REF(VAR1,1),VAR1,VAR1,10,1),COLORFFCC66;
STICKLINE(VAR1>80,VAR1,VAR1,8,1),COLOR00FF00;
STICKLINE(VAR1<20,VAR1,VAR1,8,1),COLORYELLOW;
ABV:=MA(SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0)/25000,2);
M1:=EMA(ABV,12);
M2:=EMA(ABV,26);
MTM:=CLOSE-REF(CLOSE,1);
MMS:=((100)*(EMA(EMA(MTM,6),6)))/(EMA(EMA(ABS(MTM),6),6));
MMM:=((100)*(EMA(EMA(MTM,12),12)))/(EMA(EMA(ABS(MTM),12),12));
MML:=((100)*(EMA(EMA(MTM,26),26)))/(EMA(EMA(ABS(MTM),26),26));
MTGJ:=C-REF(C,1);
ZLGJ:=100*EMA(EMA(MTGJ,9),9)/EMA(EMA(ABS(MTGJ),9),9);
MAZL:=MA(ZLGJ,5);
A:=((VOL)/(CAPITAL))*(100);
S:=((MA(A,30))/(MA(INDEXA,10)))*(MA(INDEXA,60));
Y:=((MA(A,120))/(MA(INDEXA,10)))*(MA(INDEXA,60));
X:=1;
V1:=(HIGH+OPEN+LOW+(2)*(CLOSE))/(5);
V2:=REF(V1,1);
V3:=MAX(V1-V2,0);
V4:=ABS(V1-V2);
V5:=SMA(V3,10,1);
V6:=SMA(V4,10,1);
V8:=COUNT(((V5)/(V6)<0.2),5);
V9:=COUNT((LLV(V1,10)=V1),10);
主力进出:IF((MMS>REF(MMS,1) AND ZLGJ>REF(ZLGJ,1) AND CROSS(ABV,M2) AND ABV>REF(ABV,1) AND M1>REF(M1,1) AND M2>REF(M2,1)),65,0),COLORWHITE,POINTDOT;
主进主轨:=ABV>M2 AND CROSS(ABV,M1) AND CROSS(ZLGJ,MAZL);
STICKLINE(主力进出 OR 主进主轨,65,0,4,1),COLORWHITE;
精准买卖:=V8>=1 AND V9>=1 AND CLOSE>OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND (VOL>REF(VOL,1)) AND MMS>MML AND CROSS(ABV,M2);
短线买点:=V8>=1 AND V9>=1 AND CLOSE>OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND (VOL>REF(VOL,1)) AND CROSS(MMS,MML) AND ABV>REF(ABV,1);
中线买点:=V8>=1 AND V9>=1 AND CLOSE>OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND (VOL>REF(VOL,1)) AND ABV>REF(ABV,1) AND MMS>MML AND CROSS(MMM,MML) AND MMS>REF(MMS,1) AND MMM>REF(MMM,1) AND MML>REF(MML,1);
主进主买:=ABV>M2 AND ZLGJ>MAZL AND CROSS(MMS,MML) AND MMS>REF(MMS,1) AND MMM>REF(MMM,1) AND MML>REF(MML,1);
短中精:=精准买卖 OR 短线买点 OR 中线买点 OR 主进主买;
主力买卖:IF(短中精,60,0),COLORFF00FF,POINTDOT;
STICKLINE(主力买卖,60,0,4,1),COLORFF00FF;
主力轨迹:IF(ABV>M2 AND MMS>MML AND CROSS(ZLGJ,MAZL) AND ZLGJ>REF(ZLGJ,1) AND MAZL>REF(MAZL,1),55,0),COLORFFCC66,POINTDOT;
STICKLINE(主力轨迹,55,0,4,1),COLORFFCC66;
拉升在即:IF(S<X AND Y<X AND MMS>MML AND ABV>M1 AND CROSS(S,Y),50,0),COLORYELLOW,POINTDOT;
STICKLINE(拉升在即,50,0,4,1),COLORYELLOW;
底部构成:IF(V8>=1 AND V9>=1 AND CLOSE>OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND VOL>REF(VOL,1) AND ABV>M2 AND ZLGJ>MAZL,45,0),COLOR00FF00,POINTDOT;
STICKLINE(底部构成,45,0,4,1),COLOR00FF00;
ROC:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;
HSL:=100*VOL/CAPITAL;
冲击波:IF(CROSS(ROC,16) AND HSL>3.5,40,0),COLOR0099FF,POINTDOT;
STICKLINE(冲击波,40,0,4,1),COLOR0099FF;
3. 懂牛三线扭转指标源码?
懂牛三线扭转指标公式源码:VAR255:=LLV(LOW,5);
VAR355:=HHV(HIGH,50);
动力线:EMA((CLOSE-VAR255)/(VAR355-VAR255)*5,5)*20,POINTDOT;
STICKLINE(动力线>REF(动力线,1) ,动力线 ,REF(动力线,1),8,1),colorlired;
STICKLINE(动力线REF(获利比,1) ,获利比 ,REF(获利比,1),4,1),colorlired;
STICKLINE(获利比<=REF(获利比,1) ,获利比 ,REF(获利比,1),4,1),COLOR00FF00;
LC:=REF(CLOSE,1);
4. rsj指标源码?
rsi指标讲解的主要内容是基础的指标公式、买卖指标公式、精确买卖点、趋势分析、自用以及复合通道公式的解析,希望能够在实战中帮助到广大投资者。
//基础指标公式
50,DOTLINE;20;80;
DRAWBAND(80,RGB(0,30,255),100,RGB(0,30,255));
DRAWBAND(20,RGB(0,150,200),0,RGB(0,150,200));
DRAWTEXT_FIX(1,0.02,0,0,'★RSI6与RSA12金叉参考买入.死叉参考卖出. ★威廉WR大于80买入区.小于20卖出区.'),COLOR00FFFF,LINETHICK3;
CC:=FORCAST(C,3); HH:=FORCAST(H,3); LL:=FORCAST(L,3);
LC:=REF(WMA((2*CC+HH+LL)/4,3),1);
RSI6:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,COLORFF9900,LINETHICK0;
RSI12:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,COLOR00FFFF,LINETHICK0;
DRAWBAND(RSI6,RGB(255,80,0),RSI12,RGB(0,255,100));
SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,COLORFF9900,LINETHICK3;
IF(RSI6>REF(RSI6,1),RSI6,DRAWNULL),COLOR0000FF,LINETHICK4;
SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,COLOR00FFFF,LINETHICK2;
威廉WR:FORCAST(100*(HHV(HH,14)-CC)/(HHV(HH,14)-LLV(LL,14)),5),COLOR00FFFF,DOTLINE;
IF(威廉WR>80 ,威廉WR,DRAWNULL),COLOR00FF00,LINETHICK3;
IF(威廉WR<20,威廉WR,DRAWNULL),COLOR0000FF,LINETHICK3;
导入软件之后的基本走势图形有:
//买卖指标公式
N1:=6;
N2:=6;
N3:=6;
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
MA60:MA(C,60);
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
A:20;
D:80;
买:=RSI1<20 OR RSI1<80 AND C>REF(C,1)AND VOLREF(MA60,1) AND MA5>REF(MA5,1)AND MA10>REF(MA10,1)AND MA20>REF(MA20,1);
DRAWTEXT(买,RSI1*0.8,'买'),COLOR0099FF;
卖:=RSI1>80 AND VOL>REF(VOL,1);
DRAWTEXT(卖,RSI1*1.09,'卖'),COLOR0099FF;
//精确买卖点公式
LC := REF(CLOSE,1);
R:SMA(MAX(CLOSE-LC,0),9,1)/SMA(ABS(CLOSE-LC),9,1)*10;
K:=r-REF(r,1);
STICKLINE(k>REF(k,1) AND R<3 AND (k<0 OR REF(k,1)<0),3,5,2),colorred;
STICKLINE(k5.5,5,7,2),colorgreen;
x:=(k>REF(k,1) AND R<3.0 AND (k<0 OR REF(k,1)<0))*8;
y:=((k5.5)>0)*8;
//趋势分析
VAR1:=HHV(HIGH,33);
VAR2:=LLV(LOW,33);
A:=(SMA((CLOSE-VAR2)/(VAR1-VAR2),8,1))*(100),COLOR00FFFF;
价格线:EMA(HHV(A,3),1),colorgreen;
va1:=(CLOSE-LLV(LOW,90))/(HHV(HIGH,90)-LLV(LOW,90))*100;
va2:=SMA(va1,9,1),colorwhite;
趋势线:SMA(va2,6,1),colorff00ff;
va4:=3*va2-2*趋势线,colorff00ff;
撑压线:WMA((va2+趋势线+va4)/3,60),colorred;
LC:= REF(CLOSE,1);
RSI6:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,colorwhite;
RSI12:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,coloryellow;
卖线:85,LINETHICK02,POINTDOT,Color15FF15;
界线:50,LINETHICK02,POINTDOT,ColorFF1EFF;
买线:20,LINETHICK02,POINTDOT,Color28FFFF;
5. rsi原始源码公式?
公式如下
CRSI:="RSI.RSI3#WEEK";
HRSI:=HHV("RSI.RSI1#WEEK",2);
金叉RSI:=STICKLINE(CROSS("RSI.RSI2#WEEK","RSI.RSI3#WEEK"),88,12,0.6,0);
VARA:=REF(CLOSE,1);
VARE:=SMA(MAX(CLOSE-VARA,0),6,1)/SMA(ABS(CLOSE-VARA),6,1)*100;
ARSI下:=STICKLINE(HRSI<=CRSI,HRSI,CRSI,0.1,1);
VAR1:=(CLOSE*2+HIGH+LOW)/4;
SK:=EMA(VAR1,13)-EMA(VAR1,73);
SD:=EMA(SK,2);
XG:((CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03) OR (CROSS(SK,SD) AND SK<=-0.14 )
OR (CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035)) OR 金叉RSI)*20;
6. 股票指标春夏秋冬公式?
春夏秋冬公式如下:
主线:=EMA(EMA(C,1),5);
本:=EMA(HHV(主线,5),1),COLOR00FFFF,LINETHICK2;
急:=EMA(HHV(本,21),1),COLOR0089FF,LINETHICK1;
稳:=EMA(HHV(急,21),2),COLORDB89FF,COLOR00FF00,LINETHICK2;
投:=EMA(HHV(稳,21),3),COLOR8916FF,LINETHICK1;
散:=EMA(HHV(投,21),4),COLORFFCC62,LINETHICK1;
集:=EMA(HHV(散,21),5),COLORFFFFFF,LINETHICK2;
马:=EMA(HHV(集,21),6),COLORFF5B5E,LINETHICK2;
OX:0;
XG:=主线/马*100-100;
春:=XG<0 AND XG>=REF(XG,1);
夏:=XG>0 AND XG>REF(XG,1);
秋:=XG>0 AND XG<REF(XG,1);
冬:=XG<0 AND XG<REF(XG,1);
春天1:=IF(春=1,XG,MA(XG,10)),COLORMAGENTA,LINETHICK2;
夏天1:=IF(夏=1,XG,MA(XG,10)),COLORRED,LINETHICK2;
秋天1:=IF(秋=1,XG,MA(XG,10)),COLORYELLOW,DOTLINE;
冬天1:=IF(冬=1,XG,MA(XG,10)),COLORCYAN,DOTLINE;
STICKLINE(春天1>MA(XG,10),春天1,MA(XG,10),2,0),COLORFF00FF;
STICKLINE(夏天1>MA(XG,10),夏天1,MA(XG,10),2,0),COLORRED;
STICKLINE(秋天1<MA(XG,10),秋天1,MA(XG,10),2,0),COLORBROWN;
STICKLINE(冬天1<MA(XG,10),冬天1,MA(XG,10),2,0),COLORCYAN;
春天:IF(春=1,C,MA(XG,10)),COLORMAGENTA,LINETHICK1;
夏天:IF(夏=1,C,MA(XG,10)),COLORRED,LINETHICK1;
秋天:IF(秋=1,-1,MA(XG,10)),COLORYELLOW,DOTLINE;
冬天:IF(冬=1,-20,MA(XG,10)),COLORCYAN,DOTLINE;
7. 怎样把MACD中的DEA变色?
DIF:EMA(CLOSE,12)-EMA(CLOSE,26)
;DEA:EMA(DIF,9)
;MACD:(DIF-DEA)*2,COLORSTICK;IF(DEA
8. 成交量指标公式源码?
成交量指标的公式源码:
A03:=(EMA((AMOUNT/100000),1)/3);
A04:=(WINNER(CLOSE)/ 0.3);
A05:=IF((BARSCOUNT(CLOSE) >100),A03,A04);
量:A05 LINETHICK2 ;
动量: (EMA(量, 13.000) * 1.5)LINETHICK2;
A01:=IF((量 > 动量),量,0);
A08:=BARSLAST((A01 > 0));
A09:=REF(量,A08);
趋势:IF((量 <= A01),量,A09),LINETHICK2,COLORRED;
盘整天数:BARSLAST((A01 > 0)),LINETHICK0,COLORMAGENTA;
量价同行:IF(趋势>量,趋势,DRAWNULL),COLORCYAN,LINETHICK2;
A0D:=((((REF(量, 1.000) = REF(趋势, 1)) AND (量 >= REF(量, 1))) AND (量 >= 动量)) AND (REF(量, 1) <= REF(量, 2)));
量价突破选股:IF(((((量 = 趋势) AND (CLOSE > REF(CLOSE, 1))) AND (量 > REF(量, 1))) AND (REF(A08, 2) > 0)), 888,0),LINETHICK0;
量价同行选股:IF((量 = 趋势), 888,0)LINETHICK0;
量价背离选股:IF((REF(((动量 > REF(动量,1)) AND (MA(CLOSE, 5) < REF(MA(CLOSE, 5), 1))), 1) AND 量价突破选股), 888,0),LINETHICK0;
再次上攻选股:IF(A0D, 888,0),LINETHICK0;
DRAWICON(量价突破选股>0,量,9);
DRAWICON(A0D>0,量,6);
DRAWTEXT(再次上攻选股>0,(量*0.7),'再次上攻'),COLORMAGENTA;
DRAWTEXT(量价背离选股>0,(量*1.149),'背离后上攻'),COLORGREEN;
DRAWTEXT(量价突破选股>0,(量*0.699),'上攻'),COLORCYAN。
9. bias优化指标公式?
通达信BIAS优化版指标公式:
N:=9;
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+ (CLOSE-LOW)),VOL/2))*0.70828;
主动卖盘:=(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE< OPEN,0-VAR1*(HIGH-LOW),0-VOL/2))*0.63275;
VA:=(主动买盘+主动卖盘);
VVV:=IF((DATE > 17374085120),0,1);
AVPRICE:=((CLOSE + OPEN + LOW + HIGH)/(4))*(VVV);
成交金额:=(VA)*(AVPRICE);
A:=(SUM(成交金额,N) + 0.001)/(SUM(VA,N) + 0.001);
乖离线:=(((AVPRICE - A))/(MAX(AVPRICE,A)))*(VVV);
STICKLINE((乖离线 > 0),0,乖离线,3,0),COLORRED;
STICKLINE((乖离线 < 0),0,乖离线,3,0),COLORFF0000;
长期:(CLOSE-MA(A,55))/MA(A,55)*100,COLORYELLOW,STICK,LINETHICK3;
IF(长期<=0,长期,0),COLORWHITE,STICK,LINETHICK3;
中期:(CLOSE-MA(A,34))/MA(A,34)*100,COLORFF00FF,STICK,LINETHICK3;
IF(中期<=0,中期,0),COLORFFFF33,STICK,LINETHICK3;
短期:(CLOSE-MA(A,13))/MA(A,13)*100,COLORRED,STICK,LINETHICK3;
IF(短期<=0,短期,0),COLORBLUE,STICK,LINETHICK3;
VAR2:=REF(HIGH,1)*1.1;
VAR3:=HIGH*1.1;
VAR4:=(VAR3*VOL+VAR2*(CAPITAL-VOL))/CAPITAL;
VAR5:=REF(LOW,1)*0.9;
VAR6:=LOW*0.9;
VAR7:=(VAR6*VOL+VAR5*(CAPITAL-VOL))/CAPITAL;
VAR8:=EMA(VAR7,30);
VAR9:=EMA(VAR4,30);
VAR10:=VAR9-2;
VAR11:=IF(CLOSE<=VAR8,VAR10,VAR9);
VAR12:=VAR11*2.5;
VAR13:=VAR10*2.5;
STICKLINE(VAR12=VAR13,中期,0,4,1),COLOR66FF99;
上通道:MA(短期,20)+1.618*STD(长期,20),COLOR0099FF,LINETHICK2;
下通道:MA(短期,20)-1.618*STD(长期,20),COLOR0099FF,LINETHICK2;
生命轨迹:短期,COLOR00FF00;