以下是大智慧涨跌幅指标公式源码和使用说明
使用说明:
数据选择:首先,选择您感兴趣的证券或股票,并确定分析的时间段。您可以选择不同的时间间隔,如日线、周线或月线,根据您的需求和交易策略来决定。
数据获取:获取所选证券或股票的价格数据。确保您拥有所需的历史价格数据,以便计算涨跌幅指标。
计算涨跌幅:使用上述公式,将当前期的价格减去前一期的价格,然后除以前一期的价格,并乘以100,得到涨跌幅指标的百分比值。
分析和解读:根据计算出的涨跌幅指标数值,可以进行以下分析和解读:
正值表示价格上涨,负值表示价格下跌。数值的绝对值越大,表示价格波动幅度越大。
根据涨跌幅指标的变化,可以判断价格的趋势是上升、下降还是震荡。
结合其他技术指标和图表模式,可以进一步分析市场趋势,并做出相应的交易决策,如买入、卖出或持有。
大智慧涨跌幅指标公式源码:
N:=20;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=/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)));
ddx:((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,1000000,10000),COLOR00AAAA,LINETHICK;
DX:=MA(DDX,5)*N;
stICKLINE(DDX 0,0,DDX,2,0),COLOR000088;
STICKLINE(DDX 0,0,DDX,2.5,0),COLOR0000AA;
STICKLINE(DDX 0,0,DDX,1.5,0),COLOR0000CC;
STICKLINE(DDX 0,0,DDX,1,0),COLOR0000EE;
STICKLINE(DDX 0,0,DDX,2,0),COLOR008800;
STICKLINE(DDX 0,0,DDX,2.5,0),COLOR00AA00;
STICKLINE(DDX 0,0,DDX,1.5,0),COLOR00CC00;
STICKLINE(DDX 0,0,DDX,1,0),COLOR00EE00;
DDX1:SMA(DX,3,1),COLORFFFFFF;
DDX2:SMA(DDX1,3,1),COLOR00FFFF;
DDX3:EMA(DDX2,5),COLORFF00FF;
预警:DDX 0ANDMA(V,5) MA(MA(V,5),5)ANDcrOSS(DDX1,DDX2),LINETHICK;
天:=COUNT(DDX 0,5),COLORRED;
DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK6,COLOR00FFFF;
DIFF:(EMA(C,12)-EMA(C,26));
DEA:EMA(DIFF,9),COLOR747474;
AO:2*(DIFF-DEA),,NODRAW,,COLOR80FF00;
STICKLINE(AO REF(AO,1)ANDAO 0,0,AO,0.5,0),COLORFFA346;
STICKLINE(AO =REF(AO,1)ANDAO 0,0,AO,0.5,0),COLORRED;
STICKLINE(AO REF(AO,1)ANDAO 0,0,AO,0.5,0),COLOR4080FF;
STICKLINE(AO =REF(AO,1)ANDAO 0,0,AO,0.5,0),COLOR80FF00;
S1:=CROSS(0,AO);
DRAWICON(S1,DEA,2);
H1:=AO L1:=AO
B1:=CROSS(AO,0);
DRAWICON(B1,0,-0.1);
多转空:=((((LLV(AO,4) 0)AND(AO REF(AO,1)))AND(REF(AO,1) REF(AO,2)))
AND(REF(AO,2) REF(AO,3)));
空转多:=((((HHV(AO,4) 0)AND(AO REF(AO,1)))AND(REF(AO,1) REF(AO,2)))
AND(REF(AO,2) REF(AO,3)));
转暖:IF(DIFF REF(DIFF,1),DIFF,DRAWNULL),COLORFF00FF,LINETHICK1;
转凉:IF(DIFF REF(DIFF,1),DIFF,DRAWNULL),COLORF07800,LINETHICK2;
IF2:IF(DEA =DIFF,DIFF,DRAWNULL),LINETHICK2,COLOR00FF00;
桔子:CROSS(DIFF,DEA),NODRAW,COLOR4080FF;
DRAWICON(桔子,DEA,17);
ZL:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
F11:=zig(3,15);
FXx:=IF((F11 REF(F11,1)),5,105);
转向:=crOSS(ZL,FXx);
高点:=CROSS(fxx,ZL);
VERTLINE(转向,1),color00009f;
VERTLINE(高点,1),color009f00;
DRAWICON(转向,LOW,1),ALIGN1,VALIGN0;
DRAWICON(高点,H,2),ALIGN1,VALIGN0;
TS:=BArslAST(转向);
涨幅:=(C-ref(L,TS+1))/ref(L,TS+1)*100;
DRAWTEXTREL(750,30,'波段涨幅:'+INTPART(波段涨幅)+'%'),COLOR0000ff,LINETHICK3;
GD:=BARSLAST(高点);
波段跌幅:=(C-ref(H,GD+1))/ref(H,GD+1)*100;
DRAWTEXTREL(750,100,'波段跌幅:'+INTPART(波段跌幅)+'%'),COLOR00ff00,LINETHICK3;
大智慧涨跌幅指标公式截图