各位大哥,幫忙小弟把以下的源碼改為DZH 或?。疲兀实?!謝謝!
<奇妙撐壓>
input:n(13,2,100),p(3,1,10);
DRAWGBK(1, COLORRGB(100,50,0), COLORRGB(100,100,0),0);
{K線}
aa1:=wma(c,2);//短加權(quán)均線
bb1:=ema(aa1,2);//平滑
a:=ma(bb1,3);//平均
aa2:=wma((h+c+o)/3,18);//長加權(quán)均線
dd3:=a>=aa2 and c>aa2;//短>長,且收>長
dd4:=a<aa2 ;//短<長
dd5:=a>aa2 ;//短>長
STICKLINE((dd4 or dd5) and o<=c ,h,l,0.5,0),Color00cc99;//跌勢陽線
STICKLINE((dd4 or dd5) and o<=c ,c,o,7,0),Color00cc99;//跌勢陽線
STICKLINE((dd4 or dd5) and o>=c ,h,l,0.5,0),Color3F8C3A;//跌勢陰線
STICKLINE((dd4 or dd5) and o>=c ,c,o,7,0),Color3F8C3A;//跌勢陰線
STICKLINE((dd3 or c>aa2) and o<=c,c,o,7,0),Colorred;//漲勢陽線
STICKLINE((dd3 or c>aa2) and o<=c,h,l,0.5,0),Colorred;//漲勢陽線
STICKLINE((dd3 or c>aa2) and o>=c,c,o,7,0),Colorff33ff;//漲勢陰線
STICKLINE((dd3 or c>aa2) and o>=c,h,l,0.5,0),Colorff33ff;//漲勢陰線
{kdj}
RSV1:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
KK:=SMA(RSV1,3,1);
DD:=SMA(KK,3,1);
JJ:=3*KK-2*DD;
M:=BARSLAST(CROSS(DD,JJ));
G:=REF(H,M);
警示線:STICKLINE(G,G,G,10,1),COLORYELLOW,linethick2;//進(jìn)場;止贏;止損;黃
{箱型區(qū)間操作指標(biāo)}
hh:=h;ll:=l;
top:=h;
bot:=l;
xx[1]:=1;
kk:=1;
for i=1 to datacount do begin
if xx[i]=1 then begin
top[i]:=hh[i];
end;
if xx[i-1]=1 then begin
if hh[i]>top[i-1] then begin
top[i]:=hh[i];
xx[i]:=1;
end;else begin
top[i]:=top[i-1];
xx[i]:=2;
end;
end;
if xx[i-1]=2 then begin
if hh[i]>top[i-1] then begin
top[i]:=hh[i];
xx[i]:=1;
end;else begin
top[i]:=top[i-1];
bot[i]:=ll[i];
xx[i]:=3;
end;
end;
if xx[i-1]=3 then begin
top[i]:=top[i-1];
if ll[i]< bot [i-1] then begin
bot[i]:=ll[i];
xx[i]:=3;
end;else begin
bot[i]:=bot[i-1];
xx[i]:=4;
end;
end;
if xx[i-1]=4 then begin
top[i]:=top[i-1];
if ll[i]<bot [i-1] then begin
bot[i]:=ll[i];
xx[i]:=3;
end;else begin
bot[i]:=bot[i-1];
xx[i]:=5;
end;
end;
if xx[i-1]=5 then begin
if ll[i]<bot [i-1] or hh[i] > top[i-1] then begin
top[i]:=hh[i];
bot[i]:=hh[i];
xx[i]:=1;
end;else begin
bot[i]:=bot[i-1];
top[i]:=top[i-1];
xx[i]:=5;
end;
end;
end;
for j=1 to datacount do begin
if xx[j]=5 and xx[j-1]=4 then begin
for k=j-1 downto j-kk do begin
top[k]:=top[j];
bot[k]:=bot[j];
end;
end;
if xx[j-1]=5 and xx[j]=1 then kk:=0;
kk:=kk+1;
end;
jj:=BARSLAST(top<>ref(top,1));
STICKLINE(top,top,top,10,1),SHIFT5,colorcyan;
drawnumber(top<>ref(top,1),ref(top,jj)*1.015 ,(top-bot)*100/bot,2),SHIFT5,colorff9900;
STICKLINE(bot,bot,bot,10,1),SHIFT5,COLORBLUE;
drawnumber(top<>ref(top,1),ref(bot,jj)*0.99,top-bot ,2),SHIFT5,COLORBLUE;
{主圖RSI}
x1:=REF(C,1);
x2:=SMA(MAX(C-x1,0),N,1)/SMA(ABS(C-x1),N,1)*100;
x3:=((3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-
2*SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1)-50)*
1.032+50);
x4:=(x2+x3)/2;
奇妙:c+(x4/50-1)*(ma(c,30)/20)*p,PRECISION2,Color0098FF;
《百戰(zhàn)不怠》----副圖指標(biāo)原碼
DRAWGBK(1, COLORRGB(100,50,0), COLORRGB(100,100,0),0);
{籌碼空間}
STICKLINE(c and WINNER(C)>ref(WINNER(C),1),WINNER(C)*100,0,5,1),COLORRED;//籌碼空間
STICKLINE(c and WINNER(C)<ref(WINNER(C),1),WINNER(C)*100,0,5,0),COLORCYAN;//籌碼空間
K: EMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,8),PRECISION2,COLORGREEN;
Vx1:=EMA((C-LLV(L,55))/(HHV(H,34)-LLV(L,55))*100,3);
D: EMA(0.667*REF(K,1)+0.333*K,2),PRECISION2,COLORYELLOW;
籌碼快線:ema(WINNER(C)*100,13),PRECISION2,COLORMAGENTA;
籌碼慢線:ema(WINNER(C)*100,55),PRECISION2,COLORBLUE;
以下是第三個(gè)公式源碼
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(84,RSI) , h*1.05,'賣出') ,colorblue;
SK:=EMA(((2*C+H+L)/4-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,n);
SD:=EMA(0.667*REF(SK,1)+0.333*SK,p);
DRAWTEXT(IF(count(close<ref(close,1),x)/x>q/10 and vol>=1.5*ma(vol,5) and
count(sk>=sd,3) and ref(low,1)=LLV(Low,120),1,0),l*0.95,'買進(jìn)') ,colorblue;
DRAWTEXT(IF(count(close<ref(close,1),13)/13>6/10 and
count(sk>sd,6) and ref(low,5)=LLV(Low,120) and ref(close>=open,4) and
ref(close>open,3) and REF(CLOSE>OPEN,2) AND ref(open>close,1) and
open>ref(close,1),1,0),l*0.95,'買進(jìn)'),colorblue;
DRAWTEXT(if(CLOSE<MA(CLOSE,80)-MA(CLOSE,10)/3 and VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08
AND CLOSE<MA(CLOSE,13)*1.3,1,0),l*0.95,'抄底'),colorblue;
var1:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,5);
買入1:=(var1<6 AND CLOSE/MA(CLOSE,40)<0.85 AND (CLOSE-OPEN)/OPEN*100>4)*90,LINETHICK3,COLORFFAA66;
買入2:=(var1<6 AND CLOSE/MA(CLOSE,40)<0.76 AND LOW*1.051<HIGH AND COUNT(LOW*1.051<HIGH,5)>1)*70,LINETHICK2,COLORGREEN;
買入3:=(var1<6 AND INDEXC*1.03<MA(INDEXC,5) AND INDEXC*1.13<MA(INDEXC,20))*60,LINETHICK2,COLORblue;
DRAWICON(var1<6 AND CLOSE/MA(CLOSE,40)<0.85 AND (CLOSE-OPEN)/OPEN*100>4,l*0.9,10);
DRAWTEXT(var1<6 AND CLOSE/MA(CLOSE,40)<0.85 AND (CLOSE-OPEN)/OPEN*100>4,l*0.85,'--->買入1'),colorred;
DRAWICON(var1<6 AND CLOSE/MA(CLOSE,40)<0.76 AND LOW*1.051<HIGH AND COUNT(LOW*1.051<HIGH,5)>1,l*0.9,10);
DRAWTEXT(var1<6 AND CLOSE/MA(CLOSE,40)<0.76 AND LOW*1.051<HIGH AND COUNT(LOW*1.051<HIGH,5)>1,l*0.85,'--->買入2'),colorred;
DRAWICON(var1<6 AND INDEXC*1.03<MA(INDEXC,5) AND INDEXC*1.13<MA(INDEXC,20),l*0.9,10);
DRAWTEXT(var1<6 AND INDEXC*1.03<MA(INDEXC,5) AND INDEXC*1.13<MA(INDEXC,20),l*0.85,'--->買入3'),colorred;
Var4:=EMA((EMA(CLOSE,95)-EMA(CLOSE,120)),35);
Var5:=((EMA(CLOSE,95)-EMA(CLOSE,120))-Var4)*2;
DRAWICON(FILTER(Var5>0.3,30),h*1.05,9);
DRAWTEXT(FILTER(Var5>0.3,30),h*1.05,'--->頂'),colorred;
Var6:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
Var7:=SMA(Var6,5,1);
Var8:=SMA(Var6,10,1);
Var9:=Var8>80 OR Var7>80;
DRAWICON(CROSS(Var8,Var7) AND Var9,h*1.1,11),ALIGN0;
DRAWTEXT(CROSS(Var8,Var7) AND Var9,HIGH*1.11,'-->賣出'), colorblue;
D1:=((AMOUNT)/(VOL))/(100);
D2:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
D3:=((SUM(AMOUNT,13))/(D1))/(100);
D4:=DMA(D2,(VOL)/(D3));
D5:=((CLOSE-D4)/(D4))*(100);
D6:=((INDEXC-LLV(INDEXL,10))/(HHV(INDEXH,10)-LLV(INDEXL,10)))*(100);
KK:=SMA(D6,3,1);
DD:=SMA(KK,3,1);
DRAWICON(CROSS(KK,DD) AND (KK<50) AND (COUNT((D5<=(-17)),5)>=1),LOW,1),Color00FF00;
AA1:=((CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15)))*(100);
AA2:=SMA(AA1,5,1);
K:=SMA(AA2,3,1);
D:=SMA(K,3,1);
S:=IF(CROSS(K,D) AND (K<20),100,0);
S1:=IF(CROSS(D,K) AND (K>40),100,0);
DRAWTEXT(FILTER(S,30),LOW,'買'),ColorFFFFFF;
A6:=REF(CLOSE,1);
A7:=((SMA(MAX(CLOSE-A6,0),6,1))/(SMA(ABS(CLOSE-A6),6,1)))*(100);
A8:=EMA(((((2)*(CLOSE)+HIGH+LOW)/(4)-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100),6);
A9:=EMA((0.66699999)*(REF(A8,1))+(0.333)*(A8),4);
DRAWTEXT(IF(((COUNT((CLOSE<REF(CLOSE,1)),8))/(8)>0.30000001) AND COUNT((A8>A9),3) AND (REF(LOW,1)=LLV(LOW,120)) AND (CLOSE>OPEN),1,0),LOW,'-->買'),Color0000FF;
DRAWTEXT(CROSS(85,A7),HIGH,'-進(jìn)入風(fēng)險(xiǎn)'),Color0000FF;
Var51:=EMA(EMA(EMA(CLOSE,8),13),62);
Var52:=(REF(HIGH,1)+REF(LOW,1))/2;
Var53:=MA(CLOSE,m)+2*STD(CLOSE,m);
DRAWICON(CROSS(Var52,Var53),HIGH*1.035,11);
DRAWTEXT(CROSS(Var52,Var53),HIGH*1.04,'-->賣出'), COLORGREEN;
Var54:=SMA(MAX(CLOSE-REF(CLOSE,1),0),m1,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),m1,1)*100;
Var55:=FILTER(CROSS(m2,Var54),4);
DRAWICON(Var55,HIGH*1.035,11);
DRAWTEXT(Var55,HIGH*1.04,'-->賣出'), COLORblue;
Var56:=EMA(((2*CLOSE+HIGH+LOW)/4-Var51)/(Var52-Var51)*100,7);
Var57:=EMA(0.667*REF(Var56,1)+0.333*Var56,5);
DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.6 AND VOL>=1.5*MA(VOL,5) AND COUNT(Var56>=Var57,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW,'●買進(jìn)');
DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),13)/13>0.6 AND COUNT(Var56>Var57,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE>=OPEN,4) AND REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) AND OPEN>REF(CLOSE,1),1,0),LOW,'●買進(jìn)'), , COLORblue;
Var58:=MA(CLOSE,80)-MA(CLOSE,10)/3;
DRAWTEXT(IF(CLOSE<Var58 AND VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'●抄底'), , COLORRED;
DRAWICON(CROSS(MA(CLOSE,5),MA(CLOSE,30)),LOW-LOW*0.01,8);
ma5:ma(c,5);
bb5:=ma5-ref(ma5,1);
ma10:ma(c,10);
bb10:=ma10-ref(ma10,1);
PARTLINE(bb5>0,MA5),colorcc00ff,LINETHICK2;
PARTLINE(bb5<=0,MA5),colorff9999,LINETHICK2;
PARTLINE(bb10>0,MA10),color0066ff,LINETHICK2;
PARTLINE(bb10<=0,MA10),color00ff33,LINETHICK2;
MA5速率:bb5*100,LINETHICK0;
MA10速率:bb10*100,LINETHICK0;
BB:=MA(((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10)))*(100),20);
VAR61:=(REF(HIGH,1))*(1.1);
VAR62:=(HIGH)*(1.1);
VAR63:=((VAR62)*(VOL)+(VAR61)*(CAPITAL-VOL))/(CAPITAL);
VAR64:=(REF(LOW,1))*(0.89999997);
VAR65:=(LOW)*(0.89999997);
VAR66:=((VAR65)*(VOL)+(VAR64)*(CAPITAL-VOL))/(CAPITAL);
VAR67:=EMA(VAR66,30);
VAR68:=EMA(VAR63,30);
VAR69:=VAR68-2;
VAR70:=IF((CLOSE<=VAR67),VAR69,VAR68);
底:VAR70,,linethick2,ColorA5E2E;
趨:VAR69,,pointdot,linethick4,Color10578C;
【趨勢線】:=(SMA(BB,30,1))/(20),linethick2,Colorblue;
【底部線】:=(HHV(HIGH,30))/(LLV(LOW,30)),linethick2,ColorFFFF00;
STICKLINE(CROSS(【底部線】,【趨勢線】),底*1.15,底*1.2,8,0),color972E6E;
DRAWTEXT(CROSS(【底部線】,【趨勢線】),底,'【進(jìn)入底部】'),Color972E6E;
STICKLINE(CROSS(【趨勢線】,【底部線】),底*1.15,底*1.2,8,0),color395558;
DRAWTEXT(CROSS(【趨勢線】,【底部線】),底,'【沖出底部】'),Color395558;
很長有勞哪位熱心的大哥了,小弟拜謝!股票論壇 www.55188.com
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。