文章目录:
谁知道这个指标源代码?主图!谢谢
input:P1(5);
年:MA(CLOSE,26),color00ff00;
cp:="cpzb@cp";
cp,LINETHICK0;
DRAWICON(cp=1,l*0.95,4),ALIGN1;
DRAWICON(cp=9,h*1.05,5),ALIGN1;
DRAWtext(cp=1,l*0.925,'B'),coloryellow,ALIGN1;
DRAWtext(cp=9,h*1.085,'S'),colorgreen,ALIGN1;
dp:=if(c=INDEXC,0,1);
gj:=AMOUNT/v/100;
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
STICKLINE(DISPSTATUS=2 and dp=1 and c=今日阻力,今日阻力,今日阻力,30,0),Color0000FF;
STICKLINE(DISPSTATUS=2 and dp=1 and c今日阻力,今日阻力,今日阻力,30,0),Color00FF00;
STICKLINE(DISPSTATUS=2 and dp=1 and c=今日支撑,今日支撑,今日支撑,30,0),ColorFF00FF;
STICKLINE(DISPSTATUS=2 and dp=1 and c今日支撑,今日支撑,今日支撑,30,0),ColorFF0000;
if DISPSTATUS=2 then a:=BARPOS;
if DISPSTATUS=1 then b:=BARPOS;
d:=a-b;
e:=hhv(h,d);
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2, e*1.08,'-----------------------------------'),ColorFFFFFF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c=今日支撑, e*1.07,'今日支撑=:'+NUMTOSTRN(今日支撑 ,2 )+' '),ColorFF00FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c今日支撑, e*1.07,'今日支撑=:'+NUMTOSTRN(今日支撑 ,2 )+' '),ColorFF0000,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c=今日阻力, e*1.07,'今日阻力=:'+NUMTOSTRN(今日阻力 ,2 )),Color0000FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c今日阻力, e*1.07,'今日阻力=:'+NUMTOSTRN(今日阻力 ,2 )),Color00FF00,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2, e*1.04,'-----------------------------------'),ColorFFFFFF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c=明日支撑, e*1.05,'明日支撑=:'+NUMTOSTRN(明日支撑 ,2 )+' '),Color00FFFF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c明日支撑, e*1.05,'明日支撑=:'+NUMTOSTRN(明日支撑 ,2 )+' '),Color00FFFF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c=明日阻力, e*1.05,'明日阻力=:'+NUMTOSTRN(明日阻力 ,2 )),Color00FFFF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and c明日阻力, e*1.05,'明日阻力=:'+NUMTOSTRN(明日阻力 ,2 )),Color00FFFF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and vref(v,1) and ma(v,5)ref(ma(v,5),1),e*1.03,' 今日成交量大于昨日,且有继续增大趋势'),Color8285FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and vref(v,1) and ma(v,5)ref(ma(v,5),1),e*1.03,' 今日成交量小于昨日,但有放大迹象'),Color8285FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and vref(v,1)and ma(v,5)ref(ma(v,5),1),e*1.03,' 今日成交量大于昨日, 但有缩小迹象'),Color8285FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and vref(v,1)and ma(v,5)ref(ma(v,5),1),e*1.03,' 今日成交量小于昨日,且有缩小迹象'),Color8285FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and vref(v,1)and ma(v,5)ref(ma(v,5),1),e*1.03,' 今日成交量大于昨日, 但有缩小迹象'),Color8285FF,ALIGN2;
DRAWTEXT(c0 and dp=1 and DISPSTATUS=2 and vref(v,1)and ma(v,5)ref(ma(v,5),1),e*1.03,' 今日成交量小于昨日,且有缩小迹象'),Color8285FF,ALIGN2;
Var1:=EMA(C,3);
Var2:=EMA(C,5);
Var3:=EMA(C,10);
Var4:=EMA(C,20);
Var5:=EMA(C,30);
Var6:=(Var2+Var3+Var4+Var5)/4;
Var7:=(Var6-REF(Var6,15))/REF(Var6,15)*100;
Var8:=(Var6-REF(Var6,15))/REF(Var6, 15)*100;
Var9:=EMA(Var7,8);
STICKLINE(Var71*REF(Var7,1),h,l,0.5,0),COLORBLUE;STICKLINE(Var71*REF(Var7,1),o,c,5, 1),COLORBLUE;
STICKLINE(Var71*REF(Var7,1),h,l,0.5,0),COLORRED;STICKLINE(Var71*REF(Var7,1),o,c,5, 1),COLORRED;
STICKLINE(Var71*REF(Var7,1) AND Var91*REF(Var9,1),h,l,0.5,0),COLORGREEN;STICKLINE(Var71*REF(Var7,1) AND Var91*REF(Var9,1),o,c,5, 1),COLORGREEN;
买进价:=((c-ref(ma(c,6),1))/6+ma(c,6))*1.004;
买进条件:=cross(c,买进价) and 买进价ref(买进价,1);
STICKLINE(买进条件,h,l,0.5,1),colorwhite,linethick2;STICKLINE(买进条件,o,c,6,0),colorwhite,linethick2;
加码价:=((c-ref(ma(c,18),1))/18+ma(c,18))*1.004;
加码条件:=cross(c,加码价) and 加码价ref(加码价,1);
STICKLINE(加码条件,h,l,0.5,1),coloryellow,linethick2;STICKLINE(加码条件,o,c,6,0),coloryellow,linethick2;
请老师帮忙编写下图主图指标公式,用在通达信版
通达信专用机构通道主图指标公式
M1:=EMA(C,5);M2:=EMA(C,13);M3:=EMA(C,34);
MC1:=EMA(C,55);MC2:=EMA(C,89);MA4:=EMA(C,144);
判势线:=NEWSAR(1,100),COLORYELLOW,LINETHICK2;
牛熊线:IF(MC1MAX(MC2,MA4),MC1,IF(MC1MIN(MC2,MA4),MC2,MA4)),COLORFF00CC,LINETHICK2;
AA:=1;
中轨:EMA(CLOSE,17)*AA,LINETHICK1,COLORFFFFFF;
卖出线:中轨+2*STD(CLOSE,17),LINETHICK1,COLOR0000FF;
买入线:中轨-2*STD(CLOSE,17),LINETHICK1,COLOR00CC00;
清仓线:中轨+3*STD(CLOSE,17),LINETHICK1,COLORFF00FF;
满仓线:中轨-3*STD(CLOSE,17),LINETHICK1,COLOR00AA00;
LOCK:=IF(TIME1160101,1,0);
VARA:=MA(CLOSE,20);
趋势线:IF(VARAREF(VARA,2),VARA,IF(VARAREF(VARA,2),VARA,VARA)),COLOR00FF00;
IF(VARAREF(VARA,2),VARA,DRAWNULL),LINETHICK2,COLORFF00FF;
IF(VARA=REF(VARA,2),VARA,DRAWNULL),LINETHICK2,COLORFF0000;
IF(VARAREF(VARA,2),VARA,DRAWNULL),LINETHICK2,COLOR00FF00;
买入:IF(VARAREF(VARA,2) AND REF(VARA=REF(VARA,2),1),1,0),NODRAW,COLORAAAAAA;
DRAWICON(CROSS(LOW,满仓线),满仓线*0.96,11);
DRAWICON(CROSS(HIGH,清仓线),HIGH,12);
TY:=CLOSE;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(CLOSE,BARSLAST(HD)); B:=REF(CLOSE,BARSLAST(LD));
T1:=BARSLAST(HD)BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)BARSLAST(LD) AND NOT(LD);
波峰:IF(T1,A,A),COLORFF00FF,POINTDOT;
STICKLINE(T1,A,A,1.5,0),COLORFF00FF;
波谷:IF(T2,B,B),COLOR80FF00,POINTDOT;
STICKLINE(T2,B,B,1.5,0),COLOR80FF00;
MA1:=MA(C,3);
XG1:=MA1REF(MA1,1) AND REF(MA1,1)REF(MA1,2) AND CMA(C,7);
DRAWTEXT(FILTER(XG1,9),LOW*0.97,'B'),COLORRED,LINETHICK2;
DRAWICON(FILTER(XG1,9),LOW*0.98,1);
VAR2:=SUM(IF(CLOSEOPEN,VOL,0),30)/SUM(VOL,30)*100;
VAR3:=100-SUM(IF(CLOSEOPEN,VOL,0),30)/SUM(VOL,30)*100;
多头力量:= VAR2;
空头力量:= VAR3;
RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
XG2:=多头力量 空头力量 AND 多头力量 - 空头力量30 AND CROSS(D,K) OR
MA1REF(MA1,1) AND REF(MA1,1)REF(MA1,2) AND REF(MA1,2)REF(MA1,3) AND K50;
DRAWTEXT(FILTER(XG2,9),H*1.06,'S'),COLORGREEN,LINETHICK2;
DRAWICON(FILTER(XG2,9),H*1.02,2);
{跳空缺口}
LL1:=REF(L,1);
HH1:=REF(H,1);
SQK:=LHH1;
XQK:=HLL1;
上跳:IF(SQK=1,L-HH1,DRAWNULL),COLORFF00FF,CROSSDOT,LINETHICK3,NODRAW;
下跳:IF(XQK=1,H-LL1,DRAWNULL),COLORGREEN,CROSSDOT,LINETHICK3,NODRAW;
STICKLINE(SQK,L,HH1,4*1,1),COLORYELLOW;{上跳}
STICKLINE(XQK,H,LL1,4*1,2),COLOR00FF00;{下跳}
DRAWTEXT(SQK,H,'上跳'),COLORYELLOW;
DRAWTEXT(XQK,L,'下跳'),COLOR00FF00;
{补缺口}
K1:=BARSLAST(LREF(H,1));
K2:=LREF(H,K1+1) AND COUNT(LREF(H,K1+1),K1)=1;
STICKLINE(K2,L,O,1,0),COLORFF00FF;{缺口回补};
DRAWTEXT(K2=1,L,'回补'),COLORFF00FF;
主图指标公式源码如何添加
通达信,大智慧可以直接选择主图指标,同花顺不可以,但是可以修改系统默认的主图指标达到添加主图指标的目的
ER(XG2,9),H*1.06,'S'),COLORGREEN,LINETHICK2;DRAWICON(FILTER(XG2,9),H*1.02,2);{跳空缺口}LL1:=REF(L,1);HH1:=REF(
;STICKLINE(Var71*REF(Var7,1),o,c,5, 1),COLORRED;STICKLINE(Var71*REF(Var7,1) AND Var91*REF(Var9,1),h,l,0.5,0),COL
;今日支撑:=REF(明日支撑 , 1);STICKLINE(DISPSTATUS=2 and dp=1 and c=今日阻力,今日阻力,今日阻力,30,0),Color0000FF;STICKLINE(DISPSTATUS=2 and dp=1 and c