以下是通达信简约航海家主图指标公式源码和使用说明
通达信简约航海家主图指标公式源码:
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORWHITE;
马线:MA(牛线,3),COLORFF7F00;
买线:EMA(C,2),COLOR000999;
卖线:EMA(SLOPE(C,21)*20+C,42),POINTDOT,coloryellow;
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWTEXT(BU,LOW-0.06,'买进'),coloryellow;
DRAWTEXT(SEL,HIGH+0.2,'卖出'),colorgreen,LINETHICK7;
DRAWICON(BU,LOW-0.02,5);
DRAWICON(sel,HIGH+0.1,2);
STICKLINE(CROSS(买线,卖线)ORCROSS(卖线,买线),OPEN,CLOSE,6,0),colorblue;
INPUT:N(18),S(26),P(12),M(9);{N为考查量变周期,可按个人喜好设置其数值}
a:=EMA(CLOSE,s);
T:=EMA(CLOSE,P);
b:=ema(a,m);
t1:=ema(t,m);
DEA:ema(T-(t1-T),2),colorff8866,LINETHICK2;//蓝,MACD 0,DEA 0
diff:DEA-EMA(((a-b)-(t-t1)),1)*6,colorffff66,LINETHICK2;;
MACD_:STICKLINE(diff DEA,diff,DEA,0.1,0),COLORccccff;
STICKLINE(diff DEA,diff,DEA,0.1,0),COLOREEAA88;
KLINE(O,H,L,C,0);
PARTLINE(a-b t-t1,DEA),colorred,LINETHICK2;//红,MACD 0,DEA 0
PARTLINE(A TANDa-b t-t1,DEA),color00ff00,LINETHICK2;//绿,MACD 0,DEA 0
PARTLINE(A TANDa-b t-t1,DEA),colorFF00BB,LINETHICK2;//紫,MACD 0,DEA 0
大量高价线:VALUEWHEN(V REF(HHV(V,N),1),HIGH),LINETHICK;
小量低价线:VALUEWHEN(V REF(LLV(V,N),1),L),LINETHICK;
PARTLINE(小量低价线=REF(小量低价线,1),小量低价线),COLORFF00FF;
PARTLINE(大量高价线=REF(大量高价线,1),大量高价线),COLOR00FFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS,SYSPARAM(5),'DEA线变色的意义:■红:MACD>0,DEA>0■紫:MACD>0,DEA 0■绿:MACD<0,DEA<0■蓝:MACD<0,DEA>0'),COLORFFCCEE;
通达信简约航海家主图指标公式截图