以下是主黄金线 源码

大智慧主图  主黄金线指标(源码)P1:=3;

结合成交量,用于波段操作,高抛低吸,效果不错,供大家参考.

C/C++ Code复制内容到剪贴板P2:=5; P3:=8; P4:=13; P5:=21; P6:=34; K:=1; MA1:MA(C,P1); MA2:MA(C,P2); MA3:MA(C,P3); MA4:MA(C,P4); MA5:MA(C,P5); MA6:MA(C,P6); T:=BARSLAST(DISPSTATUS=1)+1; A:=DISPSTATUS=2;HH:=HHV(H, T);LL:=LLV(L, T);HL:=HH-LL;wH:=HHVBARS(H, T);wL:=LLVBARS(L, T); KK:=wH-wL;mHL:=HH-HL*0.5; if K=1 then begin HL191:=(HH-LL)*0.191;HL382:=(HH-LL)*0.382;HL618:=(HH-LL)*0.618;HL809:=(HH-LL)*0.809; if KK<0 then begin a1:=HH-HL191;a2:=HH-HL382;a3:=HH-HL618;a4:=HH-HL809; end else begin a1:=LL+HL191;a2:=LL+HL382;a3:=LL+HL618;a4:=LL+HL809; end end if k=1 then begin HL125:=(HH-LL)*0.125;HL250:=(HH-LL)*0.25;HL375:=(HH-LL)*0.375;HL625:=(HH-LL)*0.625;HL750:=(HH-LL)*0.75;HL875:=(HH-LL)*0.875; if kk<0 then begin b1:=HH-HL125;b2:=HH-HL250;b3:=HH-HL375;b4:=HH-HL625;b5:=HH-HL750;b6:=HH-HL875; end else begin b1:=LL+HL125;b2:=LL+HL250;b3:=LL+HL375;b4:=LL+HL625;b5:=LL+HL750;b6:=LL+HL875; end end DRAWTEXT(A and K<>3,HH, ‘最高价:’+HH),ALIGN2,CulorFF00FF; DRAWTEXT(A and K<>3,LL, ‘最低价:’+ll),ALIGN2,VALIGN2,Culor00FF00; DRAWTEXT(A and K<>3,mHL,’50%:’+mHL),ALIGN2,CulorFF8000; DRAWTEXT(A and K=1, a1, ‘0.191:’+NUMTOSTRN(a1,2)),ALIGN2,Culor4080FF; DRAWTEXT(A and K=1, a2, ‘0.382:’+NUMTOSTRN(a2,2)),ALIGN2,Culor4080FF; DRAWTEX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N2,CulorFF8000,linethick7; DRAWTEXT(A and K=1, a1, ‘﹊﹊ ﹊ ﹊ ﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊’),ALIGN2,color208FFF,linethick0; DRAWTEXT(A and K=1, a2, ‘﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊’),ALIGN2,color208FFF,linethick0; DRAWTEXT(A and K=1, a3, ‘﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊﹊’),ALIGN2,color208FFF,linethick0; DRAWTEXT(A and K=1, a4, ‘﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊ ﹊﹊﹊’),ALIGN2,color208FFF,linethick0; DRAWTEXT(A and K=1, b1, ‘﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉’),ALIGN2,CulorC0C0C0; DRAWTEXT(A and K=1, b2, ‘﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉’),ALIGN2,CulorC0C0C0; DRAWTEXT(A and K=1, b5, ‘﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉’),ALIGN2,CulorC0C0C0; DRAWTEXT(A and K=1, b6, ‘﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉﹉’),ALIGN2,CulorC0C0C0; {市场成本:DMA(AMOUNT/V/100,V/CAPITAL),Culor0080FF,LINETHICK1; DRAWICON(CROSS(C,市场成本),L,1),ALIGN1;} PT:= REF(HIGH,1)-REF(LOW,1); 重心:=(HIGH + LOW + CLOSE)/3; 压力Ⅰ:=2*重心-LOW;压力Ⅱ:= 重心 + PT; 支撑Ⅰ:=2*重心-HIGH;支撑Ⅱ:= 重心 – PT; DRAWTEXTABS(50,68,’ 重心:’+重心),Culor208FFF; DRAWTEXTABS(20,87,’ 支 撑’),Culor00FF00; DRAWTEXTABS(20,104,’ ‘+支撑Ⅰ),Culor00FF00; DRAWTEXTABS(20,122,’ ‘+支撑Ⅱ),Culor00FF00; DRAWTEXTABS(40,87,’ 压 力’),CulorFF00FF; DRAWTEXTABS(40,104,’ ‘+压力Ⅰ),CulorFF00FF; DRAWTEXTABS(40,122,’ ‘+压力Ⅱ),CulorFF00FF; DRAWTEXTABS(25,65,’│’),Culor00FFFF; DRAWTEXTABS(25,77,’│’),Culor00FFFF; DRAWTEXTABS(25,89,’│’),Culor00FFFF; DRAWTEXTABS(25,101,’│’),Culor00FFFF; DRAWTEXTABS(25,113,’│’),Culor00FFFF; DRAWTEXTABS(25,125,’│’),Culor00FFFF; DRAWTEXTABS(145,65,’│’),Culor00FFFF; DRAWTEXTABS(145,77,’│’),Culor00FFFF; DRAWTEXTABS(145,89,’│’),Culor00FFFF; DRAWTEXTABS(145,101,’│’),Culor00FFFF; DRAWTEXTABS(145,113,’│’),Culor00FFFF; DRAWTEXTABS(145,125,’│’),Culor00FFFF; DRAWTEXTABS(96,85,’│’),Culor00FFFF; DRAWTEXTABS(96,89,’│’),Culor00FFFF; DRAWTEXTABS(96,101,’│’),Culor00FFFF; DRAWTEXTABS(96,113,’│’),Culor00FFFF; DRAWTEXTABS(96,125,’│’),Culor00FFFF; DRAWTEXTABS(30,60,’──────────’),Culor00FFFF; DRAWTEXTABS(30,80,’──────────’),Culor00FFFF; DRAWTEXTABS(30,97,’──────────’),Culor00FFFF; DRAWTEXTABS(30,114,’──────────’),Culor00FFFF; DRAWTEXTABS(30,131,’──────────’),Culor00FFFF; G:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3); X:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3); ED:=barslast(G); EF:=barslast(X); DRAWTEXTREL(35,450,’买入:’+NUMTOSTR(ED) +’天’+’ 卖出:’+NUMTOSTR(EF) +’天’ ),colorFfff00; {K线优化} STICKLINE(close>=open,open,close,8,1),colorred; STICKLINE(open>close,close,open,8,0 ),CulorFFFF00; STICKLINE(close>=open,close,HIGH,0.5 ,0 ),colorred; STICKLINE(close>=open,open,low,0.5 ,0),colorred; STICKLINE(open>close,close,low,0.5 ,0 ),CulorFFFF00; STICKLINE(open>close,open,HIGH,0.5 ,0 ),CulorFFFF00; C2:=REF(C,1); 涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0); STICKLINE(涨停,OPEN,CLOSE,8,0),Culor00FFFF; 跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0); STICKLINE(跌停,OPEN,CLOSE,8,0),CulorFF8000; {粉兰色K线}; F:=100*(C-REF(C,1))/REF(C,1); 今小昨:=IF(C<REF(O,1) AND f<0,1,0); p1:=今小昨; 今小前:=IF(C<REF(O,2) AND f<0,1,0); p2:=今小前; stickline(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,open,CLOSE,6,0),COLORMAGENTA; stickline(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,open,CLOSE,3,0),COLORBLUE; DRAWTEXT(G,L*0.997,’△’),ALIGN1,VALIGN0,Culor00FF00; DRAWTEXT(G,L,’ ̄’),ALIGN1,VALIGN0,Culor00ff00; DRAWTEXT(X,H*1.002,’▽’),ALIGN1,VALIGN2,CulorFF00FF; DRAWTEXT(X,H,’ ̄’),ALIGN1,VALIGN0,CulorFF00FF; DRAWTEXTREL(180,25,’所属板块:’+BKNAME),COLORFFFFFF; 今市上涨家数:=INDEXADV; 平盘家数:=DYNAINFO(68); 今市下跌家数:=INDEXDEC; WW:=BARSLAST(DISPSTATUS=1); DRAWTEXTABS(210,32,’◇目前可见K线:’+NUMTOSTRN(WW+1,0)+’天’),COLORYELLOW; DRAWTEXTABS(30,10,’今市上涨:’+今市上涨家数+’ 家’),CulorFFFF00,linethick2; DRAWTEXTABS(58,25,’平盘:’+平盘家数+’ 家’),CulorFFFF00,linethick2; DRAWTEXTABS(58,40,’下跌:’+NUMTOSTRN(今市下跌家数,0)+’ 家’),CulorFFFF00,linethick2; viewdays:=WW+1; top:=HHV(H,viewdays); bottom:=LLV(L,viewdays); T:top+0.05*top,Culor0080FF,LINETHICK0; B:bottom-0.05*bottom,Culor0080FF,LINETHICK0;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。