1.股票指标cci公式
2.求大智慧多周期均线多头排列公式
3.macd多周期同显公式
股票指标cci公式
股票指标cci公式
CCI指标,股票是多周一种重点研判当前股价偏离某段时间平均价格程度的技术指标分析工具,也可以理解为一种超买超卖指标。式源
CCI指标和其它指标一样,码股可以多周期切换,票多交易软件上面都可以操作。周期粽子小游戏源码CCI指标显示为一条白色的分析线,并配有具体数值。股票一般而言,多周以上为多头市场,式源-以下为空头市场,码股到负之间为震荡市场,票多可以结合股价走势和CCI波动区间来判断市场是周期phpcms 源码解读超买了还是超卖了。数值向两级偏离越大,分析孕育的股票机会可能就越大,市场可能就会产生变盘。
以日CCI指标为例,CCI的计算公式:CCI(N日)=(TP-MA)÷(MD×0.)
TP=(最高价+最低价+收盘价)÷3
求大智慧多周期均线多头排列公式
看看我这个均线怎么样?演示下面网址里有.
n:=;
LH:=;
EMA1:EMA(C,1);
ema:ema(c,),COLORFF;
ema:ema(c,),colorFFFF;
ema:ema(c,),colorffff;
ema:ema(c,),COLORGREEN;
MA:MA(C,),COLORYELLOW,POINTDOT,LINETHICK2;
生命线:eMA(CLOSE,),colorffff,POINTDOT,LINETHICK2;
LOCK:=1;
M8:=EMA(CLOSE,8);
M:=EMA(M8,);
VAR1:=EMA(M,);
VAR2:=(CLOSE+HIGH+LOW)/3;
VAR3:=EMA(VAR2,)*LOCK;
VAR4:=REF(VAR3,1)*LOCK;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,9*0.5,0),COLORFF5B;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,8*0.5,0),COLORFF6C;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,7*0.5,0),COLORFF7B;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,6*0.5,0),COLORFF9C;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,5*0.5,0),COLORFFBE;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3.5*0.5,0),COLORFFCC;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5*0.5,0),COLORFFFF;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,9*0.5,0),COLOR;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,8*0.5,0),COLORA3;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,7*0.5,0),COLORB7;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,6*0.5,0),COLORCD;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,5*0.5,0),COLORE9;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3*0.5,0),COLORE9;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.5*0.5,0),COLOREF3;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1*0.5,0),COLORBF3;
STICKLINE(CLOSE>OPEN,OPEN,LOW,1*0.5,0),COLORCA;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,1*0.5,0),COLORCA;
STICKLINE(OPEN>CLOSE,CLOSE,LOW,1*0.5,0),COLORDE;
STICKLINE(OPEN>CLOSE,OPEN,HIGH,1*0.5,0),COLORDE;
AAA:=MA(C,);
BBB:=ATAN((AAA/REF(AAA,1)-1)*)*/3.;
CCC:=FILTER(CROSS(BBB,),5);
DRAWTEXT(CCC AND C>AAA,AAA*0.,'十日∠'),COLORFFFF;
ar1:=ema>ema and ema>ema;
ar2:=BARSLAST((c-ema)/ema*<-6);
ar3:=ema>=ref(ema,2);
ar4:=count(cross(c,ema),ar2)=1;
ar5:=ar1 and ar2 and ar3 and ar4;
ar6:=ar5 and filter(ar5,);
drawtext(ar6,l-0.,'红杏出墙'),COLORccff;
stickline(ar6,h,l,0.5,1),COLORccff;
stickline(ar6,o,c,6,1),linethick2,COLORccff;
br1:=count(BETWEEN((c-ref(c,1))/ref(c,1)*,0,5) ,5)=5;
br2:=abs((ema-ema)+(ema-ema))/c<0.2;
br3:=c>ema and (ref(c,1)<ref(ema,1) or ref(c,2)<ref(ema,2) or ref(c,3)<ref(ema,3) or ref(c,4)<ref(ema,4) or ref(c,5)<ref(ema,5));
br4:=br1 and br2 and br3;
drawtext(br4 and filter(br4,),l-0.,'蚂蚁上树'),colorC5FF;
stickline(br4 and filter(br4,),h,l,0.5,1),colorC5FF;
stickline(br4 and filter(br4,),o,c,6,1),linethick2,colorC5FF;
cr1:=(c-ref(c,1))/ref(c,1)*>0.5;
cr2:=v>ma(v,5)*0.6;
cr3:=count(cross(ema,ema),3)=1;
cr4:=abs(ema-ema)/ema<0.;
cr5:=ema<=ema and ema>=ref(ema,1);
cr6:=FILTER(cr1 and cr2 and cr3 and cr4 and cr5,2);
stickline(cr6,h,l,0.5,1),colorfff0;
stickline(cr6,o,c,6,1),linethick2,colorfff0;
drawtext(cr6,l-0.,'红衣侠女'),colorfff0;
dr1:=ema>ema and ema<ema;
dr2:=BARSLAST(cross(c,ema) );
dr3:=h=hhv(h,dr2);
dr4:=BARSLAST(dr3);
dr5:=count(o>c and c<ref(c,1) and c>ema and BETWEEN((c-ema)/ema,0,0.),dr4)=1;
dr6:=c>ref(c,1) ;
dr7:= dr1 and dr5 and dr6 ;
dr8:=dr7 and FILTER(dr7 ,);
drawtext(dr8,l-0.,'黑客点击'),colord6ba;
stickline(dr8,h,l,0.5,1),colord6ba;
stickline(dr8,o,c,6,1),linethick2,colord6ba;
er:=barslast(ref(cross(ema,ema),1)) and cross(ema,ema);
DRAWTEXT(er,l-0.,'均线互换'),colorff;
stickline(er,h,l,0.5,1),colorff;
stickline(er,o,c,6,1),linethick2,colorff;
fr:=barslast(ref(cross(ema,ema),1)) and cross(ema,ema);
DRAWTEXT(fr,l-0.,'梅开二度'),colorwhite;
stickline(fr,h,l,0.5,1),colorwhite;
stickline(fr,o,c,6,1),linethick1,colorwhite;
gr1:=BARSLAST(BETWEEN("bias.bias2"(6,,),0,5) );
gr2:=ema>ema and ema>ema and ema>ref(ema,1);
gr3:=count("bias.bias2"(6,,)> and h=hhv(h,gr1),gr1);
gr4:=h=hhv(h,gr1);
gr5:="macd.macd"(,,9)<ref("macd.macd"(,,9),1);
gr6:=gr2 and gr3 and gr4;
gr7:=gr2 and gr3 and gr4 and gr5;
drawtext(gr6 and gr7,h+0.,'见好就收!'),colorff;
DRAWTEXT(gr6 and gr7,h+0.1,'▼'),colorff;
hr2:=ema>=ref(ema,3) and ema>=ref(ema,1) and ema>=ref(ema,1) and cross(c,ema) and cross(c,ema) and cross(c,ema);
DRAWTEXT(hr2 and filter(hr2,),h+0.1,'▲'),colorFFC8FF;
DRAWTEXT(hr2 and filter(hr2,),h+0.5,'揭竿而起'),colorcc;
DRAWTEXT(hr2 and filter(hr2,),l-0.,'三线推进'),COLORYELLOW;
stickline(hr2 and filter(hr2,),h,l,0.5,1),COLORYELLOW;
stickline(hr2 and filter(hr2,),o,c,6,1),linethick2,COLORYELLOW;
SK:= EMA(Var1,)-EMA(Var1,);
SD:= EMA(SK,2);
drawtext((cross(sk,sd) and sk<-0. and (c-ref(c,1))/ref(c,1)>=0.) or (cross(sk,sd) and sk<=-0. )
or (cross(sk,sd) and sk<=0. and (v/ma(v,5)>2 or c/ref(c,1)>0.)) ,l*0.,'短'),COLORcc;
stickline((cross(sk,sd) and sk<-0. and (c-ref(c,1))/ref(c,1)>=0.) or (cross(sk,sd) and sk<=-0. )
or (cross(sk,sd) and sk<=0. and (v/ma(v,5)>2 or c/ref(c,1)>0.)),h,l,0.5,0),COLORcc;
stickline((cross(sk,sd) and sk<-0. and (c-ref(c,1))/ref(c,1)>=0.) or (cross(sk,sd) and sk<=-0. )
or (cross(sk,sd) and sk<=0. and (v/ma(v,5)>2 or c/ref(c,1)>0.)),o,c,,1),linethick1,COLORcc;
MA1:=MA(((HIGH + LOW) / 2),5);MA2:=MA(((HIGH + LOW) / 2),);x:=((MA1 - MA2) * );
均势一:=(((((((((CLOSE + REF(CLOSE,1)) + REF(CLOSE,2)) + REF(CLOSE,3)) + REF(CLOSE,4)) + REF(CLOSE,5)) + REF(CLOSE,6)) + REF(CLOSE,7)) + REF(CLOSE,8)) / 9);
均势二:=((((CLOSE + REF(CLOSE,1)) + REF(CLOSE,2)) + REF(CLOSE,3)) / 4);
趋势一:=((((均势一 - REF(均势一,1)) / REF(均势一,1)) * ) + );
趋势二:=((((均势二 - REF(均势二,1)) / REF(均势二,1)) * ) + );
波段高位:= (CROSS(趋势一,趋势二) AND (COUNT((CLOSE > REF(HIGH,1)),) > 5));
LC:=REF(CLOSE,1);
方向值:=((SMA(MAX((CLOSE - LC),0),6,1) / SMA(ABS((CLOSE - LC)),6,1)) * );
短抄一:=((CROSS(趋势二,(趋势一 + 2)) AND (x < 0)) AND ((方向值 < ) OR (REF(方向值,1) < )));
短抄二:=((((CROSS(趋势二,MA1) AND (MA1 < )) AND (方向值 > 趋势二)) AND (x < 0)) AND
(((趋势二 < ) OR (REF(趋势二,1) < )) OR (REF(趋势二,2) < )));
DRAWTEXT((短抄一 OR 短抄二),(LOW * 0.),'短底'),ColorFF;
DRAWTEXT(波段高位,(HIGH * 1.),'卖出'),colorWhite;
DRAWICON(波段高位,(HIGH * 1.),2),colorFF;DRAWICON((短抄一 OR 短抄二),(LOW * 0.),1);
V5:=EMA(CLOSE,1);主线:=EMA(V5,5) ;
本:=EMA(HHV(主线,5),1);
急进:=EMA(HHV(本,),1);
稳健:=EMA(HHV(急进,),2);
投资:EMA(HHV(稳健,),3),linethick2, colorgray;
Y:=(MA(C,)-MA(C,))/MA(C,)*;
YY1:=C>MA(C,) AND OPEN<MA(C,);{ 一阳三线}
YY3:=C>MA(C,) AND OPEN<MA(C,);
YY5:=C>MA(C,) AND OPEN<MA(C,);
X2:DRAWTEXT(YY1 AND YY5 AND YY3,LOW-0.1,'一阳三线'),COLORRED;
SJ1:=ABS(MA(CLOSE,)-MA(CLOSE,))<C*0.;{ 线线线接近}
SJ2:=ABS(MA(CLOSE,)-MA(CLOSE,))<C*0.;
SJ3:=CROSS(MA(CLOSE,),MA(CLOSE,));{ 线上穿线}
X3:DRAWTEXT(SJ1 AND SJ2 AND SJ3,HIGH+0.1,'三军集结'),COLORRED;
RY1:=C/OPEN>1.;{ 阳线4%}
RY2:=REF(OPEN,1)/REF(CLOSE,1)>1.;{ 阴线4%}
RY3:=ABS(OPEN-REF(C,1))<C*0. AND ABS(C-REF(OPEN,1))<C*0.;{ 两线相等}
X4:DRAWTEXT(RY1 AND RY2 AND RY3 ,LOW,'日月合璧'),COLORYELLOW;
JW1:=C<OPEN AND REF(C,1)<REF(OPEN,1);
JW2:=OPEN<REF(C,1) AND C>REF(L,1);
JW3:=O<MA(C,) AND O<MA(C,) AND O<MA(C,);
JW:=JW1 AND JW2 AND JW3;
X8:DRAWTEXT(JW,LOW-0.2,'金屋藏娇'),COLORYELLOW;
TS1:=CROSS(MA(C,),MA(C,));{ 线上穿线}
TS2:=MA(C,)<MA(C,);
TS:=TS1 AND TS2;
X9:DRAWTEXT(TS,LOW-0.2,'投石问路'),COLORFFF0;
YZ1:=C/O>1. AND H/C>1. AND O/L<1.;{ 收阳有上影}
YZ2:=REF(C,1)>REF(O,1) AND O>MA(C,);{ 昨收阳 今大于均线}
YZ:=YZ1 AND YZ2 AND Y>;
X:DRAWTEXT(YZ,HIGH+0.2,'一枝独秀'),COLORFFF0;
DS1:=OPEN/C>1. AND O/REF(C,1)>1.;{ 高开收阴}
DS2:=V*/FINANCE2(7)>0. AND Y>8;{ 换手高涨幅大}
DS:=DS1 AND DS2;
X:DRAWTEXT(DS,HIGH+0.2,'独上高楼'),COLORGREEN;
YJ1:=H/O>1.;
YJ2:=ABS(C-O)<C*0.;
YJ3:=C/MA(C,)>1.1;
YJ:=YJ1 AND YJ2 AND DS2 AND YJ3 AND YZ2;
X:DRAWTEXT(YJ,HIGH+0.3,'一剑封喉'),COLORRED;
T:=(MA(C,)-MA(C,))/MA(C,)*;
TT1:=C<MA(C,) AND OPEN>MA(C,);{ 断头铡刀}
TT3:=C<MA(C,) AND OPEN>MA(C,);
TT5:=C<MA(C,) AND OPEN>MA(C,);
x:DRAWTEXT(TT1 AND TT5 AND TT3,LOW-0.6,'断头铡刀'),COLORRED;
x:DRAWTEXT(CROSS(eMA,eMA),eMA*1.,'S分道扬镳'), COLORFF;
x:DRAWTEXT(CROSS(eMA,eMA),eMA*1.,'S一箭穿心'), COLORFF;
X:DRAWTEXT(CROSS(eMA,eMA),eMA*1.,'S各自为政'), COLORFF;
VAR:=MA(CLOSE,)-MA(CLOSE,)/3;
VAR:=REF(CLOSE,1);
VAR:=(SMA(MAX(CLOSE-VAR,0),N,1))/(SMA(ABS(CLOSE-VAR),N,1))*;
X:DRAWTEXT(IF(CLOSE<VAR AND VOL/>MA(VOL,5)/ AND CLOSE>REF
(CLOSE,1)*1. AND CLOSE<MA(CLOSE,)*1.3,1,0),LOW-0.7,'进场'),COLORRED;
X:DRAWTEXT(CROSS(LH,VAR),HIGH*1.,'获利减仓');
X:DRAWTEXT(CROSS(VAR3,VAR4),L-0.3,'买'),COLORRed;
X:DRAWTEXT(CROSS(eMA,eMA),H+0.5,'投石,增持'),COLORYELLOW;
X:DRAWTEXT(CROSS(eMA,eMA),H+0.3,'红客,加仓'),COLORYELLOW;
X:DRAWTEXT(CROSS(eMA,eMA),L-0.5,'互换,重仓'),COLORYELLOW;
X:DRAWTEXT(REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>REF(OPEN,1),
L*0.,'克阴'),COLORFFFF;
X:DRAWTEXT(REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<REF(OPEN,1),
H*1.,'克阳'),COLORFF;
X:DRAWICON(CROSS(eMA,eMA),eMA,1);
X:DRAWICON(CROSS(eMA,eMA),eMA,1);
X:DRAWICON(CROSS(eMA,eMA),eMA,1);
STICKLINE(HR2 AND FILTER(HR2,),H,L,0,1),COLORFFC8FF;
FF:=EMA(CLOSE,3);MA:=EMA(CLOSE,);
DRAWTEXT(CROSS(FF,MA),(LOW * 0.),'←底背'),COLORA6E;
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * );
DRAWTEXT(CROSS(,RSI),(HIGH * 1.),'←顶背'),COLORFF;
X:DRAWICON(CROSS(eMA,eMA),eMA,1);
X:DRAWICON(CROSS(eMA,eMA),eMA,1);
X:DRAWICON(CROSS(eMA,eMA),eMA,1);
X:DRAWICON(CROSS(eMA,eMA),eMA,2);
X:DRAWICON(CROSS(eMA,eMA),eMA,2);
X:DRAWICON(CROSS(eMA,eMA),eMA,2);
macd多周期同显公式
MACD多周期同显公式是:DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA : EMA(DIFF,MID);MACD : 2*(DIFF-DEA)。
在详细解释这个公式之前,轨迹跟踪源码首先需要理解MACD(移动平均收敛/发散)的基本概念。MACD是一种趋势跟踪的动量指标,它显示了两个移动平均值之间的关系。MACD通常与移动平均线一起使用,帮助交易者识别买入和卖出信号。
1. DIFF的cnn python 源码计算:DIFF是短期EMA(指数移动平均)与长期EMA之差。在这个公式中,SHORT和LONG分别代表短期和长期的周期,CLOSE代表收盘价。例如,如果SHORT为天,LONG为天,长城电源码则DIFF就是天EMA与天EMA之间的差值。当短期EMA上穿长期EMA时,通常被认为是买入信号;反之,下穿则为卖出信号。
2. DEA的计算:DEA是DIFF的指数移动平均线,MID是其周期。DEA可以看作是DIFF的移动平均线,用于平滑DIFF的波动,从而更容易识别趋势。如果MID为9天,那么DEA就是DIFF的9天EMA。
3. MACD的计算:MACD是DIFF与DEA之间的差值的两倍。这个值以柱状图的形式在图表上表示,当MACD柱上升时,表明上涨动量增强;当MACD柱下降时,表明下跌动量增强。
在实际应用中,交易者通常会结合其他指标和市场信息来使用MACD。例如,他们可能会观察MACD柱与零线的交叉点,或者寻找MACD柱的背离现象,这些都是潜在的交易信号。
总之,MACD多周期同显公式通过计算不同周期的移动平均值及其关系,为交易者提供了一种识别市场趋势和动量变化的方法。