波段頂底源碼
『壹』 請高手將「波段交易」的文華源碼改為博易大師源碼,謝謝!
REF(C,1)>REF(MA(C,6),1) and C>MA(C,6);
REF(C,1)<REF(MA(C,6),1) and C<MA(C,6);
『貳』 請老師將源碼改為3個選股公式,分別是"低吸""堅決買進""波段買入"
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
低吸:=CROSS(RSI,11);
VAR7:=EMA(AMOUNT/VOL/100,3);
VAR9:=EMA(VAR7,88)*0.85;
VARA:=VAR9*0.87;
VARB:=LOW<VARA AND CLOSE>REF(CLOSE,1)*1.02;
堅決買進:=FILTER(VARB,6);
A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
D1:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)
+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/211;
D2:=EMA(D1,2);
D3:=EMA(D2,2);
K1:=EMA(D3,2);
波段買入:=CROSS(D1,K1);
XG:低吸+堅決買進+波段買入>0;
『叄』 求發一個大智慧KTP源代碼,謝謝
大智慧頂底極品公式
實價線:(C-LLV(L,60))/(HHV(H,60)-LLV(L,60))*100,COLORWHITE;
A1:=(2*C+H+L)/4;
A2:=LLV(L,34);
A3:=HHV(H,34);
A4:=SMA((HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100-70,9,1)+100;
A5:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;
A6:=SMA(SMA(A5,3,1),3,1)+100;
A7:=A6-A4;
底部區域:IF(A7>60,A7-60,0),COLORYELLOW;
持有:STICKLINE(REF(底部區域,1)<底部區域,底部區域,REF(底部區域,1),5,0),COLORF00FF0;
出貨:STICKLINE(REF(底部區域,1)>底部區域,底部區域,REF(底部區域,1),5,0),COLOR00FF00;
中線持有:EMA((A1-A2)/(A3-A2)*100,13),COLORBLUE;
中線出貨:EMA(0.667*REF(中線持有,1)+0.333*中線持有,2),COLORRED;
STICKLINE(中線持有-中線出貨>0,中線持有,中線出貨,8,0),COLORBLUE;
STICKLINE(中線持有-中線出貨<0,中線持有,中線出貨,8,0),COLORRED;
絕密操盤
A:MA(CLOSE,3),ColorFF00FF,LINETHICK0;
A1:=(CLOSE+HIGH+LOW)/(3);
B:=EMA(A1,10);
B2:=REF(B,1);
MA20:=EMA(CLOSE,20);
DRAWTEXT((B>B2),ma20,'*'),Colorffff00;
DRAWTEXT((B<B2),ma20,'*'),Coloryellow;
VAR1:=EMA(CLOSE,3);
VAR2:=EMA(CLOSE,8);
MA5:MA(CLOSE,5),Coloryellow;
MA21:=EMA(CLOSE,21);
STICKLINE(VAR1<MA21,h,l,0,0),Colorgreen;
STICKLINE(VAR1<MA21,c,o,8,0),Color007700;
STICKLINE(VAR1<MA21,c,o,7,0),Color008E00;
STICKLINE(VAR1<MA21,c,o,6,0),Color009900;
STICKLINE(VAR1<MA21,c,o,5,0),Color00A600;
STICKLINE(VAR1<MA21,c,o,4,0),Color00B500;
STICKLINE(VAR1<MA21,c,o,3,0),Color00C600;
STICKLINE(VAR1<MA21,c,o,2,0),Color00D500;
STICKLINE(VAR1<MA21,c,o,1,0),Color00E600;
STICKLINE(VAR1>MA21,h,l,0,0),Color106fff;
STICKLINE(VAR1>MA21,c,o,8,0),Color000084;
STICKLINE(VAR1>MA21,c,o,7,0),Color000095;
STICKLINE(VAR1>MA21,c,o,6,0),Color0000A2;
STICKLINE(VAR1>MA21,c,o,5,0),Color0000B3;
STICKLINE(VAR1>MA21,c,o,4,0),Color0000C8;
STICKLINE(VAR1>MA21,c,o,3,0),Color0000D7;
STICKLINE(VAR1>MA21,c,o,2,0),Color0000EA;
STICKLINE(VAR1>MA21,c,o,1,0),Color0000FF;
STICKLINE(VAR1<VAR2 AND VAR1>MA21,h,l,0,0),Colorff5d10;
STICKLINE(VAR1<VAR2 AND VAR1>MA21,c,o,8,0),Colorff5d10;
STICKLINE(VAR1<VAR2 AND VAR1>MA21,c,o,5,0),Colorff7710;
STICKLINE(VAR1<VAR2 AND VAR1>MA21,c,o,2,0),Colorff9910;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,h,l,0,0),Colorff00ff;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,8,0),Color8E008E;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,7,0),Color9D009D;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,6,0),ColorB000B0;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,5,0),ColorC600C6;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,4,0),ColorD000D0;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,3,0),ColorE600E6;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,2,0),ColorF900F9;
STICKLINE(VAR1>VAR2 AND VAR1<MA21,c,o,1,0),ColorFF09FF;
MA2:=MA(CLOSE,10);
MA34:=MA(CLOSE,34);
VARA:=((AMOUNT)/(VOL))/(100);
VARB:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
VARC:=((SUM(AMOUNT,7))/(VARA))/(100);
VARD:=DMA(VARB,(VOL)/(VARC));
VARE:=((CLOSE-VARD)/(VARD))*(100);
VARF:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
VARJ:=MA(VARE,20)+STD(VARE,20);
BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
K:=SMA(VARF,3,1);
頂:=(REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (K>79);
DRAWTEXT((REF(BIAS18,1)>=5) AND CROSS(VARJ,VARE) AND (K>79),h*1.02,'風險'),Coloryellow;
買了就賺
Var1:=(CLOSE+HIGH+LOW+OPEN)/4;
Var2:=SUMBARS(VOL,CAPITAL);
Var3:=HHV(Var1,Var2);
Var4:=LLV(Var1,Var2);
Var5:=(2*Var1-Var4-REF(Var4,1))/(Var3-Var4);
Var6:=(Var1-Var4)/(Var3-Var4);
Var7:=IF(Var1<=Var4,Var5*60,Var6*60);
Var8:=600*(EMA(CLOSE,3)-EMA(LOW,30))/EMA(LOW,30);
Var9:=EMA(Var8,7);
VarA:=(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))*100;
VarB:=(-100)*(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))+5;
波段買入: IF(VarA+VarB<7 AND CROSS(Var8,Var9) AND Var9<-18 AND Var9<VarB,60,50),coloryellow , ;
DRAWICON(波段買入=60,70,1),colorred;
VarC:=HHV(HIGH,9)-LLV(LOW,9);
VarD:=HHV(HIGH,9)-CLOSE;
VarE:=CLOSE-LLV(LOW,9);
VarF:=VarD/VarC*100-70;
Var10:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
Var11:=(2*CLOSE+HIGH+LOW)/4;
Var12:=SMA(VarE/VarC*100,3,1);
Var13:=LLV(LOW,34);
Var14:=SMA(Var12,3,1)-SMA(VarF,9,1);
Var15:=IF(Var14>100,Var14-100,0);
Var16:=HHV(HIGH,34);
Var17:EMA((Var11-Var13)/(Var16-Var13)*100,8);
巫修全制: Var17, ,coloryellow ;
Var18:=EMA(Var17,5);
STICKLINE(Var17>0 AND Var17-Var18>=0,79,80,6,0), ,colorred ;
STICKLINE(Var17>0 AND Var17-Var18<0,79,80,6,1), ,color00ff00 ;
STICKLINE(Var17>0 AND Var17-Var18>=0,19,20,6,0),colorred, ;
STICKLINE(Var17>0 AND Var17-Var18<0,19,20,6,1), ,color00ff00 ;
STICKLINE(Var17-Var18>0,Var17,Var18,8,1), ,colorred ;
STICKLINE(Var17-Var18<0,Var17,Var18,8,1), ,color00ff00 ;
Var22:=REF(LOW,1);
Var23:=SMA(ABS(LOW-Var22),3,1)/SMA(MAX(LOW-Var22,0),3,1)*100;
Var24:=EMA(IF(CLOSE*1.3,Var23*10,Var23/10),3);
Var25:=LLV(LOW,30);
Var26:=HHV(Var24,30);
Var27:=IF(MA(CLOSE,58),1,0);
Var28:=EMA(IF(LOW<=Var25,(Var24+Var26*2)/2,0),3)/618*Var27;
Var29:=IF(Var28>100,100,Var28);
STICKLINE(Var29>-150,0,Var29,3,0), , colorff00ff;
底部吸籌指標: (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100, , color00ff00;
STICKLINE(CROSS(底部吸籌指標,-24),100,0,6,0), , colorffffff;
先知: (CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100, , colorff00ff;
可能放量拉升: IF(CROSS(底部吸籌指標,-24),1,0), , colorffffff;
Vark1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
Vark2:=REVERSE(Vark1);
Vark3:=SMA(Vark1,3,1);
波段王:=SMA(Vark3,3,1), , COLORRED,linethick2;
波段鬼:=SMA(波段王,2.5,1),coloryellow,linethick2;
趨勢線: 3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1), ,COLORff6666,linethick2;
賣:IF((CROSS(波段鬼,波段王) or CROSS(波段鬼,趨勢線) or CROSS(波段王,趨勢線) ) AND 波段鬼>65,90,0),stick, ,colorffff00 ,linethick3;
RSV9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K1:=SMA(RSV9,3,1);
DK1:=K1-REF(K1,1),COLORSTICK;
出手就贏:IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0), STICK,COLORyellow;
DRAWICON(出手就贏>0,50 ,1);
買點准備:IF(趨勢線<=10,0,10), colorff9933,linethick3;
STICKLINE( CROSS(趨勢線,10),0,73,6,0), COLOR3366ff,;
DRAWTEXT(IF(CROSS(趨勢線,10),100,0),68,'抄底'),COLORWHITE ;
DRAWTEXT(IF(CROSS(10,趨勢線),1,0), 10,'$備錢'),COLOR33ffcc,;
{目前位置:
對當前股票所處的技術位置進行評價,可對是否介入作出輔助判斷}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
DRAWTEXT(REF(J,1)<0 AND J>0,50,'短買'),colorred ;
短線獲利:STICKLINE(REF(J,1)<0 AND J>0,60,0,2,0),color0000ff;
目前位置:K;
技術低位:20;
技術中位:50,POINTDOT;
技術高位:80;
{紅買綠賣 n:1 100 9 m1:1 100 3 m2:1 100 3 m3:1 100 5}
RSV:= (CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
FASTK:=SMA(RSV,M1,1);
K:SMA(FASTK,M2,1);
D:SMA(K,M3,1),colorwhite;
A1:=LLV(low,999999);
A2:=HHV(high,999999);
A3:=100/(A2-A1);
80,pointdot,linethick2;
20,pointdot,linethick2;
VAR1:=HHV(HIGH,9)-LLV(LOW,9);
VAR2:=HHV(HIGH,9)-CLOSE;
VAR3:=CLOSE-LLV(LOW,9);
VAR4:=VAR2/VAR1*100-70;
VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
VAR6:=(2*CLOSE+HIGH+LOW)/4;
VAR7:=SMA(VAR3/VAR1*100,3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);
VAR10:=IF(VAR9>100,VAR9-100,0);
VAR11:=HHV(HIGH,34);
VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13);
VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);
VAR14:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF
(INDEXC,1))/INDEXC,8,1)*100-25;
VAR15:=MA(Var14,3);
VAR16:=REF(VAR15,1);
STICKLINE(VAR12-VAR13>0,VAR12,VAR13,8,0),COLORRED;
STICKLINE(VAR12-VAR13<0,VAR12,VAR13,8,0),COLORgreen;
生命線:=EMA(VAR13,5);
STICKLINE(cross(VAR13,VAR12) and VAR12>60,80,100,8,0),COLOR00ff00;
綠燈亮賣:0,color00ff00;
STICKLINE(cross(VAR12,VAR13) and VAR12>VAR13 and VAR12<18,20,0,8,0),COLORRED;
紅燈亮買:0,colorred;
Var21:=INDEXC;
Var22:=MA(Var21,6);
Var23:=MA(Var21,24);
Var24:=MA(Var21,32);
Var25:=MA(Var21,62);
Var26:=MA(Var21,105);
Var27:=Var25<REF(Var25,1) AND Var26<REF(Var26,1) AND Var25<Var26*0.98;
Var28:=Var24>Var22*1.11 AND Var23>Var22*1.095;
Var29:=Var22>Var21*0.95;
抄底A:= Var27 AND Var28 AND Var29 AND CLOSE/COST(8)<=0.8 AND CLOSE<OPEN;
{抄底1:}STICKLINE(抄底A,40,60,1,1),colorff00ff;
抄底1:0,colorff00ff;
Var2A:=CLOSE/MA(CLOSE,40)*100<78;
Var2B:=CLOSE/MA(CLOSE,60)*100<74;
Var2C:=HIGH>LOW*1.051;
Var2D:=Var2C AND COUNT(Var2C,5)>1;
Var2E:=Var2D AND (Var2A OR Var2B);
Var2F:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
Var30:=(CLOSE-Var2F)/Var2F*100+30-(REF(HIGH,13)/CLOSE-1.35)*100;
Var31:=(CLOSE-REF(CLOSE,5))/CLOSE*100<-9;
Var32:=WINNER(CLOSE);
Var33:=EMA((INDEXC-MA(INDEXC,10))/INDEXC*100,14)<-4.9;
Var34:=(MA(VOL,5)-VOL)/CAPITAL*100<0.8;
Var35:=(VOL-MA(VOL,21))/VOL*100;
抄底B:= Var33 AND Var31 AND Var32<0.12 AND Var34 AND Var35>18;
{抄底2:}STICKLINE(抄底B,40,60,3,1),coloryellow;
抄底2:0,coloryellow;
Var36:=(REF(CLOSE,1)+REF(CLOSE,2)+REF(CLOSE,3)+REF(CLOSE,4)+REF(CLOSE,5))/5;
Var37:=(REF(CLOSE,2)+REF(CLOSE,3)+REF(CLOSE,4)+REF(CLOSE,5)+REF(CLOSE,6))/5;
Var38:=(REF(CLOSE,3)+REF(CLOSE,4)+REF(CLOSE,5)+REF(CLOSE,6)+REF(CLOSE,7))/5;
Var39:=(REF(CLOSE,4)+REF(CLOSE,5)+REF(CLOSE,6)+REF(CLOSE,7)+REF(CLOSE,8))/5;
Var3A:=(REF(CLOSE,5)+REF(CLOSE,6)+REF(CLOSE,7)+REF(CLOSE,8)+REF(CLOSE,9))/5;
BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
抄底C:=(Var36/CLOSE>1.112 OR Var37/CLOSE>1.123 OR Var38/CLOSE>1.135 OR Var39/CLOSE>1.145 OR Var3A/CLOSE>1.156) AND BIAS3<=-20 AND COST(25)/CLOSE>=1.5 AND CLOSE<OPEN;
{抄底3:}STICKLINE(抄底C,40,60,5,1),color0099ff;
抄底3:0,color0099ff;
Var3B:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100;
抄底D:= FILTER(IF(CROSS(Var3B,-28),1,0),8);
{抄底4:}STICKLINE(CROSS(Var3B,-28),40,60,8,1),colorwhite;
抄底4:0,colorwhite;
Var3C:=DMA(EMA(CLOSE,13),SUM(VOL,5)/2/CAPITAL);
Var3D:=(CLOSE-Var3C)/Var3C*100;
抄底E:= REF(Var3D,1)<-35 AND Var3D>REF(Var3D,1) AND REF(Var3D,1)<REF(Var3D,2) AND Var3D-REF(Var3D,1)>2.5;
{抄底5:}STICKLINE(抄底E,40,60,8,1),colorffcc66;
抄底5:0,colorffcc66;
Var3E:=100*WINNER(REF(CLOSE,1)*1.1)-100*WINNER(REF(CLOSE,1)*0.9);
抄底F:= CLOSE>OPEN*1.06 AND Var3E<10;
{抄底6:}STICKLINE(抄底F,40,60,8,1),colorblue;
抄底6:0,colorblue;
『肆』 請老師將趨勢頂底指標公式改成通達信選股公式,選出如下圖所示的股票。多謝!
沒有圖,不知道這個對不對。
底:=10,COLORCC6633,LINETHICK2;
A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19);
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4);
長期線:=A+100,COLOR9900FF;
短期線:=B+100,COLORRED;
中期線:=D+100,COLORYELLOW,LINETHICK2;
見頂:=((REF(中期線,1)>85 AND REF(短期線,1)>85 AND REF(長期線,1)>65) AND CROSS(長期線,短期線));
頂部區域:=(中期線80) AND (REF(短期線,1)>95 OR REF(短期線,2)>95 ) AND 長期線>60 AND 短期線<83.5
AND 短期線<中期線 AND 短期線<長期線+4,COLORGREEN;
頂部:=FILTER(頂部區域,4);
ZMIN:(長期線<12 AND 中期線<8 AND (短期線<7.2 OR REF(短期線,1)<5) AND (中期線>REF(中期線,1) OR 短期線>REF(短期線,1)))
OR (長期線<8 AND 中期線<7 AND 短期線<15 AND 短期線>REF(短期線,1)) OR (長期線<10 AND 中期線<7 AND 短期線<1) ,COLORGREEN;
拓展資料:
量能指標就是通過動態分析成交量的變化,識破莊家的盤中對敲、虛假放量,虛假買賣盤等欺騙手段,從真實的量能變化中找出莊家的戰略意圖,從而達到安全跟庄、穩定獲利的投資目標。
量比價先行,對於成交量研究的重要性不言而喻,但大多數投資者對成交量的認識至今仍停留在放量,縮量,天量,地量等的認識上,這種認識是片面的、眼前的、靜止的認識,有效的量能技術研究必須是全面的、歷史的、動態的。比如:滬市95年時100億成交額已經是天量,可時至今日100億只是行情向上拓展起碼的量,對某隻股票來說8%的換手已是歷史天量,但對另一隻股票來說30%的換手才能算是天量。量能技術指標就是通過動態分析成交量的變化,識破莊家的盤中對敲、虛假放量,虛假買賣盤等欺騙手段,從真實的量能變化中找出莊家的戰略意圖,從而達到安全跟庄、穩定獲利的投資目標。
VMACD又叫量平滑異同移動平均線,專門用於衡量量能的發展趨勢,屬於量能趨向指標,這種指標僅在一些先進的軟體系統中配置,一般的老八股軟體中是沒有的。
計算方法:先計算成交量的短期(SHORT)和長期(LONG)指數平滑移動平均線,再推算DIFF和DEA及兩者之差,最後得出MACD。具體計算公式:
SHORT=[2×成交量+(N-1)×上一周期成交量]
LONG=[2×成交量+(N1-1)×上一周期成交量]
DIFF=SHORT-LONG
DEA=[2×DIFF+(M-1)×上一周期DIFF]
MACD=DIFF-DEA
參數設置:N=12、N1=26、M=9
MACD的應用技巧:
1、DIFF與DEA均為正值,兩者均在零軸線之上時,DIFF向上突破DEA為買入信號。
2、DIFF與DEA均為負值,兩者均在零軸線之下時,DIFF向下跌破DEA為賣出信號。
3、DEA線與K線趨勢發生背離時為行情反轉信號。
4、分析MACD柱狀線,由紅變綠(正變負)為賣出信號;由綠變紅為買入信號。
5、DIFF與DEA均為負值時,常常會兩線長期粘合,當兩線
有效分離且DIFF在上時為中線買入信號。
MACD的實際運用:
2000年10月12日600754新亞股份(相關,行情)收盤11.70元,MACD的DIFF上穿DEA發出買入信號。隨機指標KD的D值正處於穩步上升趨勢中,股價雖然在隨後的兩天里稍有回調,但很快就被拉回上升通道中,到12月8日為止新亞股份最高曾上沖15.08元
量能指標MACD的運算方式和MACD一樣,僅是其中的計算元素不同,MACD對趨勢的研判要比價格MACD提前數天,當成交量放大而且價格上漲時一般是轉市的開始,破「0」線也是轉市的信號。因此,當成交量大幅偏離其正常水平時,投資者對後市都要特別小心。該指標和隨機指標KD及KDJ相互配合使用,可以確定中線的買賣點,准確判斷出每一波段的高低位置。
『伍』 通達信MACD多彩做波段怎麼這么准自用系列 副圖源碼
{MACD多彩做波段}{畫線部分用到未來函數---供參考}
N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1),LINETHICK2,COLORWHITE;
D:=SMA(K,M2,1),COLORYELLOW;
量能:=3*K-2*D,LINETHICK2;
RSIE:=EMA(量能,3);
DIFF : EMA(RSIE,12) - EMA(RSIE,26);
BBDIFF:=DIFF-REF(DIFF,1);
DEA : EMA(DIFF,9);
DRAWBAND(DIFF,RGB(255,105,180),DEA,RGB(34,139,34));
BBDEA:=DEA-REF(DEA,1);
MACD : 2*(DIFF-DEA), COLORSTICK;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORFFFF00;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2,0),COLOR00FF00;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0),COLOR0099FF;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORRED;
0,COLORFF8855,LINETHICK2;
IF(DIFF>DEA,DIFF,DRAWNULL),COLORRED,LINETHICK2;
IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORMAGENTA;
DRAWICON(CROSS(DIFF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIFF),DEA,2);
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,-1.5,2,0),COLORFFFF00;
DRAWTEXT(低位金叉,-1.5,' 低位金叉'),COLORFFFF00;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-1,5,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*1.2,11) ;
DRAWTEXT(二次金叉,-1,' 二次金叉'),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背離:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背離,0,1.5,3,0),COLOR00FF00;
DRAWLINE(A1=0,DEA,底背離,DEA,0),COLORRED,LINETHICK2;
DRAWTEXT(底背離,2,' 底背離'),COLOR00FF00;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
頂背離:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
STICKLINE(頂背離,0,2,3,0),COLORFF8855;
DRAWLINE(A2=0,DEA,頂背離,DEA,0),COLORFF8855,LINETHICK2;
DRAWTEXT(頂背離,2,' 頂背離'),COLORFF8855;
『陸』 rsi頂底背離選股公式請高手製作 通信達軟體的 每一個大小頂底的波段背離都選出來只要過去式就可以了
LC:=REF(CLOSE,1);
A:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
底背離:C<=LLV(C,60) AND A>LLV(A,60) AND A>=REF(A,1);
上面這個是底背離的,下面的是頂背離的:
LC:=REF(CLOSE,1);
A:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
頂背離:C>=LLV(C,60) AND A<LLV(A,60) AND A<=REF(A,1);