以下是通达信金博士指标公式源码和使用说明
使用说明:
选择合适的时间窗口:金博士波段指标的计算需要选择一个合适的时间窗口(N)。较短的时间窗口可以更敏感地反应市场波动,但可能会带来更多的噪音和虚假信号。较长的时间窗口可以过滤掉短期波动,但可能会导致较迟的信号。根据个人的投资目标和交易风格,选择适合的时间窗口。
理解指标取值范围:金博士波段指标的取值范围在0到100之间。当指标值接近100时,意味着当前收盘价接近所选时间窗口内的最高价,显示出股票或期货的强势;当指标值接近0时,意味着当前收盘价接近所选时间窗口内的最低价,显示出股票或期货的弱势。
识别信号:金博士波段指标可以通过判断其数值的变化来产生买卖信号。当指标值从低位上升到高位时,可能预示着价格上涨的,是买入信号。当指标值从高位下降到低位时,可能预示着价格下跌的趋势,是卖出信号。然而,投资者应该综合考虑其他技术指标和市场条件,以避免单一指标带来的误导。
通达信金博士波段指标公式源码:
N:=5;
M1:=3;
M2:=3;
QWX1:=HHV(CLOSE,30);
QWX2:=LLV(CLOSE,30);
QWX3:=CONST((QWX1+QWX2)/2);
QWX4:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
QWX5:=CONST((1-7/100)*(DMA(CLOSE,QWX4)));
QWX6:=CONST((1+7/100)*(DMA(CLOSE,QWX4)));
{KDJ}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KX:=SMA(RSV,3,1);
DX:=SMA(KX,3,1);
JX:=3*KX-2*DX;
{MACD}
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*2+QWX3,COLORWHITE;
DEA:=EMA(DIF,9),COLORYELLOW;
MCD:=(DIF-DEA)*2+QWX3;
DRAWBAND(MCD,RGB(120,0,100),QWX3,RGB(60,100,50));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
牛熊线:(EMA(CLOSE,30)+EMA(CLOSE,72))/2,LINETHICK2,COLORGREEN;
M5:MA(CLOSE,N),COLORWHITE;
M10:MA(CLOSE,M1),COLORYELLOW;
M20:MA(CLOSE,M2),COLORFF00FF;
VAR1:=IF(CLOSE OPEN,CLOSE,OPEN);
VAR2:=MEMA(CLOSE,5);
VAR3:=ATAN((VAR2/REF(VAR2,1)-1)*100);
VAR4:=IF(VAR3 0,VAR3,VAR3);
VAR5:=(CLOSE/REF(CLOSE,1)-1)*100;
VAR6:=VAR5 1.5ANDVAR5 -1.5;
今日之升★:LAST(VAR6,4,1)ANDVAR5 2ANDVOL REF(VOL,1),NODRAW,COLORYELLOW;
DRAWTEXT(今日之升★,L/1.01,'★'),COLORYELLOW;
强势:IF(VAR4 =REF(VAR4,1)ANDVAR4 =0,M10,DRAWNULL),COLORRED,LINETHICK2;
整理:IF(VAR4 REF(VAR4,1)ANDVAR4 0,M10,DRAWNULL),COLORGREEN,LINETHICK2;
支撑:IF(PERIOD=5,IF(BARSLAST(CURRBARSCOUNT=5),QWX5,DRAWNULL),DRAWNULL),COLORCYAN;
阻力:IF(PERIOD=5,IF(BARSLAST(CURRBARSCOUNT=5),QWX6,DRAWNULL),DRAWNULL),COLORYELLOW;
{柱型显示}
STICKLINE(CLOSE REF(CLOSE,1)*1.0985ANDCLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
STICKLINE(CLOSE REF(CLOSE,1)*0.9015ANDCLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
{蓝}
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN;
{红}
STICKLINE(CLOSE OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
{绿}
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,3,0),COLOR009900;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,2.2,0),COLOR00BB00;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,1.5,0),COLOR00DD00;
STICKLINE(CROSS(M5,EMA(C,3)),VAR1,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
{灰}
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,3,0),COLOR999999;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,1.5,0),COLORDDDDDD;
STICKLINE(CROSS(EMA(C,3),M5),OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
STICKLINE(CROSS(JX,DX),OPEN,CLOSE,0.5,0),COLORYELLOW;
STICKLINE(CROSS(DX,JX),OPEN,CLOSE,0.5,0),COLOR000099;
拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE;
拉升力A:=SMA(拉升力,6.3,1);
波峰波谷:SMA(拉升力A,3,1),COLORFF00FF;
拉升力B:=3*拉升力A-2.1*波峰波谷;
空方:=3*波峰波谷-1*拉升力A;
做空:IF(空方 拉升力B,拉升力B,空方),LINETHICK2,COLOR00FF00;
做空周期:HHV(做空,21),COLORBLUE,LINETHICK2;
多头:IF(做空 =REF(做空,1),做空,DRAWNULL),COLORRED,LINETHICK3;
DRAWICON(做空 =REF(做空,1)ANDREF(做空
,1) REF(做空,2),做空,23);
空头:IF(做空 REF(做空,1),做空,DRAWNULL),COLORGREEN,LINETHICK3;
{DRAWICON(做空 =REF(做空,1)ANDREF(做空,1) REF(做空,2),做空,19);}
:(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20,LINETHICK0,COLORWHITE;
:(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20,LINETHICK0,COLORYELLOW;
红柱:SMA(短线,3,1),LINETHICK0,COLOR0000FF;
蓝柱:SMA(中线,3,1),COLORSTICK,COLORFFFF00;
{红柱}
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,2,0),COLOR888800;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,1.5,0),COLORAAAA00;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.8,0),COLORDDDD00;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.3,0),COLORFFFF00;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,2,0),COLOR000088;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,1.5,0),COLOR0000AA;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.8,0),COLOR0000DD;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.3,0),COLOR0000FF;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,2,0),COLOR008800;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,1,0),COLOR00AA00;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,0.8,0),COLOR00DD00;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,0.3,0),COLOR00FF00;
{蓝柱}
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,2,0),COLOR880088;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,1.5,0),COLORAA00AA;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.8,0),COLORDD00DD;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.3,0),COLORFF00FF;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,2,0),COLOR888800;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,1.5,0),COLORAAAA00;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.8,0),COLORDDDD00;
STICKLINE(红柱 REF(红柱,1)AND红柱 0,0,红柱,0.3,0),COLORFFFF00;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,2,0),COLOR009999;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,1.5,0),COLOR00BBBB;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,0.8,0),COLOR00DDDD;
STICKLINE(蓝柱 REF(蓝柱,1)AND蓝柱 0,0,蓝柱,0.3,0),COLOR00FFFF;
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
操盘:=3*VAR300-2*VAR400;
A1:=crOSS(操盘,VAR300)ANDVAR300 2.1ANDC
STICKLINE(A1,5,0,4,0),COLOR770077;
STICKLINE(A1,5,0,3,0),COLOR990099;
STICKLINE(A1,5,0,2,0),COLORBB00BB;
STICKLINE(A1,5,0,1,0),COLORDD00DD;
STICKLINE(A1,5,0,0.3,0),COLORFF00FF;
DRAWTEXT(A1,5.2,'全仓'),COLORRED;
Var2:=(HIGH+LOW+CLOSE*2)/4;
Var3:=EMA(Var2,21);
Var4:=STD(Var2,21);
Var5:=((Var2-Var3)/Var4*100+200)/4;
Var6:=(EMA(Var5,5)-25)*1.56;
AK:EMA(Var6,2)*1.22;
AD:EMA(AK,2);
AJ:3*AK-2*AD;
100,POINTDOT;
0,POINTDOT;
80,POINTDOT;
买进:IF(CROSS(AK,AD),58,20);
卖出:IF(CROSS(AD,AK),58,20);
通达信金博士波段指标公式截图