指標解讀
1.波段買賣指標解讀
源碼:
獲利了結(jié):EMA(EMA(EMA(HIGH,5),5),5)*1.15,COLORFFFFFF,LINETHICK1;
風(fēng)險: EMA(EMA(EMA(HIGH,5),5),5)*1.1,COLORYELLOW;
回檔: EMA(EMA(EMA(HIGH,5),5),5)*1.05,COLOR00FF00;
平衡: EMA(EMA(EMA(HIGH,5),5),5),COLORFF00FF,LINETHICK1;
反彈: EMA(EMA(EMA(HIGH,5),5),5)*0.95,COLORGRAY,LINETHICK1;
超跌: EMA(EMA(EMA(HIGH,5),5),5)*0.9,COLORBLUE,LINETHICK1;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
買1:=VAR10;
買2:=(VAR11+VAR13+VAR15+VAR17);
賣1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(買1>0 OR 買2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S:IF(賣1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
{利多方舟}
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3;
解讀:這個指標的未來是弄不去了,。粗略看了一下,,他使用未來數(shù)據(jù)ZLG描述了一系列形態(tài),。如果不使用ZLG函數(shù),怕描述不出來這種形態(tài)特點。
前六句的核心語句是:平衡: EMA(EMA(EMA(HIGH,5),5),5),COLORFF00FF,LINETHICK1;
它是一個基本線,用最高價格的5日指數(shù)移動平均做了一個三嵌套循環(huán),。這么一循環(huán)均線就平滑了,因為他實際上已經(jīng)不是平均了5日的價格了,。而是間接的平均了15天的價格,。作者認為,或者在實際統(tǒng)計中,,認為這條均線在一定程度上代表了股票價格運行的基準線,。當然了這肯定是主觀認定?;鶞示€的意思就是價格圍繞他上下波動,。所以這部分是一個通道類交易思想的指標,同類還有布林呀,,以及東方不敗呀,,薛斯通道呀等等。
其他五句中有四句是給通道畫了一個振幅寬帶,。認為大多數(shù)情況下價格會在此振幅寬內(nèi)行進,。另外一句
獲利了結(jié):EMA(EMA(EMA(HIGH,5),5),5)*1.15,COLORFFFFFF,LINETHICK1;
是作者認為在通道寬帶頂端設(shè)的警示線,,認為大多數(shù)時候價格不會過此線,過此警戒線位,,就有見頂危險,,所以用了一個獲利了結(jié)的語句名來命名了。實際當中,,強票往往會突破這個警戒線,。這個警戒線距離基準線15%的距離,假設(shè)在基準線上持股,,到達警戒線獲利基本就是15%,。但這是短線的,因為如果是中期上漲,,一般不會碰觸警戒線,,會形成慢坡通道。價格在基準線附近盤繞,,但基準線不斷抬升,,這樣多是中期小牛股。只有短線噴發(fā)才有可能碰觸此線,。作者可能考慮這點,,認為應(yīng)該獲利了結(jié)了。
VAR3--VAR6是特別常用的語句類型:這類型的語句都是一個中心思想,,就是描述一個周期內(nèi)的振幅箱體寬,然后把現(xiàn)在價格在這個振幅箱體寬中位置比例關(guān)系進行描述,,通過信號系統(tǒng)進行表達,。來判斷未來預(yù)期的。不同的地方是周期參數(shù)不同,。取多少天的都有,。
昨天談到VAR3--VAR6箱體振幅寬語句,今天接著敘,。
VAR3給出了一個240日最高價格最高值到0值的箱體,。
VAR4給出了現(xiàn)在價格到這個箱體頂端的距離與箱體高的比例關(guān)系值。
VAR5VAR6給出了現(xiàn)在價格在一個528天-530天的箱體中的位置比例關(guān)系值,。
但語句到這里就結(jié)束了,,后面一直沒有用到,是后面的語句被刪除了,,還是這個指
標本身就是多指標優(yōu)化的一個結(jié)果,,優(yōu)化的過程中沒有刪除干凈?不得而知了,。反
正到這里這些語句就都沒用了,。
從VAR3--VAR9在這里都是無用語句,。
VAR10我已經(jīng)講過他的大概意思是:
AR10賦值:如果收盤價16%之字轉(zhuǎn)向的前1個波谷位置=0ANDHIGH>最低價+0.04,返回4,
否則返回0
{通俗理解應(yīng)該是這個意思:如果收盤價格16%的之字轉(zhuǎn)向的前一個波谷位置到現(xiàn)在
的天數(shù)是0天,并且最高價格比最低價格至少高4分錢,,就把4這個值給VAR10,,否則
就把不成立信號給VAR10}{16%的之字轉(zhuǎn)向的前一個波谷位置到現(xiàn)在的天數(shù)為0,那就
是現(xiàn)在就是這個位置,。在超過了16%的幅度的下跌中,,應(yīng)該是一個階段低點轉(zhuǎn)折的位
置。最高價格比最低價格高4分錢以上,,這應(yīng)該是描述日振幅寬的,,不能是跌停的意
思吧。就是下跌了很多,,現(xiàn)在該轉(zhuǎn)折了,,但不是在一字跌停板的狀態(tài)下下跌}
VAR11--VAR18:用ZLG轉(zhuǎn)向語句描述了一系列波的形態(tài),分成正反兩種描述,,正態(tài)的
后面給出的是買如選擇,,負態(tài)的后面給出的是賣出選擇。
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND
REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
這句描述的有一個按收盤價格計算6%轉(zhuǎn)向波的谷底價格,,這個價格是前輪下跌中的
最低位置,,因為她比前天的轉(zhuǎn)向數(shù)據(jù)小,同時又比今天的轉(zhuǎn)向數(shù)據(jù)小,,說明這是一
個V形角的底部描寫,。這里今天的轉(zhuǎn)向波數(shù)據(jù)是ZIG(3,6)。昨天的是REF(ZIG
(3,6),1),,前天的是REF(ZIG(3,6),2),,大前天的是REF(ZIG(3,6),3)。描述了一個
完整的V形轉(zhuǎn)向角形態(tài),。下面的7句話就是參數(shù)變化了,,并且有4句是使用相反的形態(tài)
描述就是描述了4個參數(shù)類型的頂部△轉(zhuǎn)角波形態(tài)。通過這八句話描述了4個參數(shù)級
別的轉(zhuǎn)向波頂?shù)仔螒B(tài)位置,,為后面的買賣給出點位條件,。
從語句使用的角度來看,這里確實使用了未來函數(shù),。但在實際交易中也確實可以使用,,參考其他條件,還是不錯的分析股票方法呢,,怕在也沒有其他函數(shù)能這樣形象的描述形態(tài)了,。--這里之所以說是未來函數(shù),就是說,他發(fā)出信號的時候因為給定參數(shù)內(nèi)的轉(zhuǎn)向幅度還可能沒有達到,,一旦中途價格反轉(zhuǎn),,沒有達到幅度的轉(zhuǎn)向信號就會消失,。也就是說給出信號的買賣點,,一旦遇到中途沒有達到給定參數(shù)幅度的轉(zhuǎn)向距離時,,當初給定的買賣信號全部消失。
B和S是兩個邏輯條件語句買點賣點,。是要求把符合條件的輸出給定信號的,。這里給定的信號標準是一個變量組,但在畫面上為什么不顯示連續(xù)線段呢,?這是因為給定條件限制的,。前面的買賣給定條件仔細看就會發(fā)現(xiàn),都是一個一個點,,如果不是因為用了轉(zhuǎn)向語句,,怕就要使用過濾語句過濾了,然后使用圖標語句標注了,。
最后{利多方舟}給定的語句同前面給定的VAR3--VAR9語句性質(zhì)是相同的,,只不過形式和參數(shù)有所不同了。
也許是這個原因,,前面的語句作者就沒有理會了,。
全部解釋基本如此,最后我在來一個總結(jié),。
這個指標我分析,,是綜合了幾個指標的特點編輯的,應(yīng)該屬于多指標優(yōu)化的一個類型,。
她的第一部分優(yōu)化進來了通道理念,。第二部分優(yōu)化進來的是波浪理念,把轉(zhuǎn)向波分析放在一個重要位置,。第三部分使用的是箱體比例關(guān)系理念。
同一指標使用三種交易中常見的理念進行綜合分析,。
{通道分析}
基線:=EMA(EMA(EMA(HIGH,5),5),5),;
平衡:基線,COLORFF00FF,LINETHICK1;
風(fēng)險:基線*1.1,COLORYELLOW;
回檔:基線*1.05,COLOR00FF00;反彈:基線*0.95,COLORGRAY,LINETHICK1;
超跌:基線*0.9,COLORBLUE,LINETHICK1;
獲利了結(jié):基線*1.15,COLORFFFFFF,LINETHICK1;
{ZLG三角轉(zhuǎn)向分析}
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
買1:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
買2:=(VAR11+VAR13+VAR15+VAR17);
賣1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(買1>0 OR 買2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S:IF(賣1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
{利多方舟箱體分析}
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3;
附錄:轉(zhuǎn)向指標部分取用操盤手線指標。
趨勢線:MA(CLOSE,5),COLORWHITE;
M10:MA(CLOSE,10),COLORYELLOW;
M20:MA(CLOSE,20),COLORRED;
M60:MA(CLOSE,60),COLORBLUE;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)
*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)
*100;
VARA:=BARSCOUNT(CLOSE);
VARB:=VAR8<20 AND VAR9<23 AND VARA>35;
VARC:=VARB AND COUNT(VARB,1)=1;
VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);
VARE:=EMA(VARD,5);
VARF:=TROUGHBARS(3,6,1)<4 AND CROSS(VARD,VARE);
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2)
AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2)
AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2)
AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2)
AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR1A:=EMA(VAR19,100);
VAR1B:=2*(VAR19-VAR1A);
VAR1C:=POW(VAR1B,3)*0.10+POW(VAR1B,1);
VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR1E:=EMA(VAR1D*0.97,3);
VAR1F:=(HIGH+LOW+CLOSE)/3;
VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));
VAR21:=CROSS(VAR1E,LOW);
買1:=VAR10;
買2:=(VAR11+VAR13+VAR15+VAR17);
賣1:=(VAR12+VAR14+VAR16+VAR18);
{VAR22:=買1 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND
VAR6=0 AND VAR20<(-110);}
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3A:=MA(CLOSE,30);
VAR4A:=MA(CLOSE,60);
VAR5A:=EMA(COST(85),7);
VAR6A:=EMA(COST(15),7);
VAR7A:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4);
VAR8A:=INTPART(VAR7*100)/100;VAR9A:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7);
VARA1:=INTPART(VAR9*100)/100;
VARB1:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);
VARC1:=INTPART(VARB*100)/100;
VARD1:=EMA(CLOSE,5)-EMA(CLOSE,10);
VARE1:=EMA(VARD,9);
VARF1:=(-100)*(HHV(CLOSE,5)-CLOSE)/(HHV(CLOSE,5)-LLV(LOW,5))+100;
VAR10A:=(-100)*(HHV(CLOSE,10)-CLOSE)/(HHV(CLOSE,10)-LLV(LOW,10))+100;
VAR11A:=(-100)*(HHV(CLOSE,20)-CLOSE)/(HHV(CLOSE,20)-LLV(LOW,20))+100;
VAR12A:=(-100)*(HHV(CLOSE,30)-CLOSE)/(HHV(CLOSE,30)-LLV(LOW,30))+100;
VAR13A:=REF(VARE,1);
VAR14A:=VARE;
VAR15A:=VAR14-VAR13;
VAR16A:=REF(VARD,1);
VAR17A:=VARD;
VAR18A:=VAR17-VAR16;
VAR19A:=OPEN;VAR1AA:=CLOSE;
買3:=IF(VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC AND VAR15>0 AND VAR18>0,0.50,0);
DRAWICON(買3>0,LOW-0.01,4);
買線:=EMA(CLOSE,2);
賣線:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
B1買:IF(買1>0 OR 買2>0,LOW-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORLIRED;
B2買:IF(CROSS(買線,賣線),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORLIRED;
S1賣:IF(賣1>0,HIGH+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S2賣:IF(CROSS(賣線,買線),H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
2.操盤手指標解讀
{操盤手線解釋}
輸出主圖自動劃趨勢線公式:收盤價的5日簡單移動平均,畫白色
輸出M10:收盤價的10日簡單移動平均,畫黃色
輸出M20:收盤價的20日簡單移動平均,畫紅色
輸出M60:收盤價的60日簡單移動平均,畫藍色
{上面為畫出四條均線的語句,,四條均線設(shè)定不同的顏色}
VAR3賦值:240日內(nèi)最高價的最低值
{給定基本材料,,下面要用到的條件}
VAR4賦值:100*(收盤價-VAR3)/VAR3
VAR5賦值:(收盤價-528日內(nèi)最低價的最低值)/(528日內(nèi)最高價的最高值-528日內(nèi)最低價的最低值)*100
VAR6賦值:(收盤價-530日內(nèi)收盤價的最低值)/(530日內(nèi)收盤價的最高值-530日內(nèi)收盤價的最低值)*100
{上面后三句是常用方式。用來定位收盤在在一個給定期限內(nèi)箱體中的比例位置關(guān)系}
VAR7賦值:0
VAR8賦值:收盤價-昨收和0的較大值的34日[1日權(quán)重]移動平均/收盤價-昨收的絕對值的7日[1日權(quán)重]移動平均*100
VAR9賦值:收盤價-昨收和0的較大值的13日[1日權(quán)重]移動平均/收盤價-昨收的絕對值的13日[1日權(quán)重]移動平均*100
{取用收盤價比昨天收盤價上漲的收盤價,,如果是下跌,,就取0值。這樣的條件下收盤價格與昨日收盤價格差的34日平均與收盤價與昨日收盤價格差7日的平均值的商的100倍}
VARA賦值:收盤價的有效數(shù)據(jù)周期數(shù){上市以來的總交易天數(shù)}
VARB賦值:VAR8<20 AND VAR9<23 AND VARA>35
{VAR8的商要小于20,VAR9的商要小于23,,同時至少是上市35天以上的股票}
VARC賦值:VARB AND 統(tǒng)計1日中滿足VARB的天數(shù)=1
{滿足條件VARB同時滿足滿足這個條件的天數(shù)至少是一天}
VARD賦值:收盤價的21日指數(shù)移動平均-收盤價的8日指數(shù)移動平均
VARE賦值:VARD的5日指數(shù)移動平均
{給定的兩個下面要用的條件}
VARF賦值:收盤價6%之字轉(zhuǎn)向的前1個波谷位置<4 AND VARD上穿VARE
{這句是說按收盤價6%之字轉(zhuǎn)向,,前面的一個波谷的位置距離今天要小于4天,也就是上一個6%以上的之字轉(zhuǎn)向形波谷距離今天至多不能超過4天,。并且前面給定條件的兩個均線值還要上穿}
VAR10賦值:如果收盤價16%之字轉(zhuǎn)向的前1個波谷位置=0 AND HIGH>最低價+0.04,返回4,否則返回0
{通俗理解應(yīng)該是這個意思:如果收盤價格16%的之字轉(zhuǎn)向的前一個波谷位置到現(xiàn)在的天數(shù)是0天,,就把4這個值給VAR10,否則就把不成立信號給VAR10}
VAR11賦值:收盤價6%的之字轉(zhuǎn)向>昨日收盤價6%的之字轉(zhuǎn)向 AND 昨日收盤價6%的之字轉(zhuǎn)向<=2日前的收盤價6%的之字轉(zhuǎn)向 AND 2日前的收盤價6%的之字轉(zhuǎn)向<=3日前的收盤價6%的之字轉(zhuǎn)向
VAR12賦值:收盤價6%的之字轉(zhuǎn)向=2日前的收盤價6%的之字轉(zhuǎn)向 AND 2日前的收盤價6%的之字轉(zhuǎn)向>=3日前的收盤價6%的之字轉(zhuǎn)向
VAR13賦值:收盤價22%的之字轉(zhuǎn)向>昨日收盤價22%的之字轉(zhuǎn)向 AND 昨日收盤價22%的之字轉(zhuǎn)向<=2日前的收盤價22%的之字轉(zhuǎn)向 AND 2日前的收盤價22%的之字轉(zhuǎn)向<=3日前的收盤價22%的之字轉(zhuǎn)向
VAR14賦值:收盤價22%的之字轉(zhuǎn)向=2日前的收盤價22%的之字轉(zhuǎn)向 AND 2日前的收盤價22%的之字轉(zhuǎn)向>=3日前的收盤價22%的之字轉(zhuǎn)向
VAR15賦值:收盤價51%的之字轉(zhuǎn)向>昨日收盤價51%的之字轉(zhuǎn)向 AND 昨日收盤價51%的之字轉(zhuǎn)向<=2日前的收盤價51%的之字轉(zhuǎn)向 AND 2日前的收盤價51%的之字轉(zhuǎn)向<=3日前的收盤價51%的之字轉(zhuǎn)向
VAR16賦值:收盤價51%的之字轉(zhuǎn)向=2日前的收盤價51%的之字轉(zhuǎn)向 AND 2日前的收盤價51%的之字轉(zhuǎn)向>=3日前的收盤價51%的之字轉(zhuǎn)向
VAR17賦值:收盤價72%的之字轉(zhuǎn)向>昨日收盤價72%的之字轉(zhuǎn)向 AND 昨日收盤價72%的之字轉(zhuǎn)向<=2日前的收盤價72%的之字轉(zhuǎn)向 AND 2日前的收盤價72%的之字轉(zhuǎn)向<=3日前的收盤價72%的之字轉(zhuǎn)向
VAR18賦值:收盤價72%的之字轉(zhuǎn)向=2日前的收盤價72%的之字轉(zhuǎn)向 AND 2日前的收盤價72%的之字轉(zhuǎn)向>=3日前的收盤價72%的之字轉(zhuǎn)向
VAR19賦值:收盤價的2日指數(shù)移動平均-收盤價的150日指數(shù)移動平均
VAR1A賦值:VAR19的100日指數(shù)移動平均
VAR1B賦值:2*(VAR19-VAR1A)
VAR1C賦值:VAR1B的3乘冪*0.10+VAR1B的1乘冪
VAR1D賦值:最低價*最高價*開盤價*收盤價的開方的開方
VAR1E賦值:VAR1D*0.97的3日指數(shù)移動平均
VAR1F賦值:(最高價+最低價+收盤價)/3
VAR20賦值:(VAR1F-VAR1F的14日簡單移動平均)/(0.015*VAR1F的14日平均絕對偏差)
VAR21賦值:VAR1E上穿最低價
買1賦值:VAR10
買2賦值:(VAR11+VAR13+VAR15+VAR17)
賣1賦值:(VAR12+VAR14+VAR16+VAR18)
VAR22賦值:買1 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5=0 AND VAR6=0 AND VAR20<(-110)
{在本指標中是無用語句}
VAR1賦值:收盤價的5日簡單移動平均
VAR2賦值:收盤價的10日簡單移動平均
VAR3A賦值:收盤價的30日簡單移動平均
VAR4A賦值:收盤價的60日簡單移動平均
VAR5A賦值:獲利盤為85%的成本分布的7日指數(shù)移動平均
VAR6A賦值:獲利盤為15%的成本分布的7日指數(shù)移動平均
VAR7A賦值:收盤價*成交量(手)*100的4日累和/成交量(手)*100的4日累和
VAR8A賦值:VAR7*100的?整數(shù)部分/100
VAR9A賦值:收盤價*成交量(手)*100的7日累和/成交量(手)*100的7日累和
VARA1賦值:VAR9*100的?整數(shù)部分/100
VARB1賦值:收盤價*成交量(手)*100的28日累和/成交量(手)*100的28日累和
VARC1賦值:VARB*100的?整數(shù)部分/100
VARD1賦值:收盤價的5日指數(shù)移動平均-收盤價的10日指數(shù)移動平均
VARE1賦值:VARD的9日指數(shù)移動平均
VARF1賦值:(-100)*(5日內(nèi)收盤價的最高值-收盤價)/(5日內(nèi)收盤價的最高值-5日內(nèi)最低價的最低值)+100
VAR10A賦值:(-100)*(10日內(nèi)收盤價的最高值-收盤價)/(10日內(nèi)收盤價的最高值-10日內(nèi)最低價的最低值)+100
VAR11A賦值:(-100)*(20日內(nèi)收盤價的最高值-收盤價)/(20日內(nèi)收盤價的最高值-20日內(nèi)最低價的最低值)+100
VAR12A賦值:(-100)*(30日內(nèi)收盤價的最高值-收盤價)/(30日內(nèi)收盤價的最高值-30日內(nèi)最低價的最低值)+100
VAR13A賦值:昨日VARE
VAR14A賦值:VARE
VAR15A賦值:VAR14-VAR13
VAR16A賦值:昨日VARD
VAR17A賦值:VARD
VAR18A賦值:VAR17-VAR16
VAR19A賦值:開盤價
VAR1AA賦值:收盤價
買3賦值:如果VAR19<=VAR1 AND VAR19<=VAR2 AND VAR19<=VAR3 AND VAR1A>=VAR1 AND VAR1A>=VARC AND VAR15>0 AND VAR18>0,返回0.50,否則返回0
當滿足條件買3>0時,在最低價-0.01位置畫4號圖標
買線賦值:收盤價的2日指數(shù)移動平均
賣線賦值:收盤價的21日線性回歸斜率*20+收盤價的42日指數(shù)移動平均
輸出 B1買:如果買1>0 OR 買2>0,返回最低價-0.02,否則返回?zé)o效數(shù),CROSSDOT,LINETHICK3,畫淡紅色
輸出B2買:如果買線上穿賣線,返回最低價-0.02,否則返回?zé)o效數(shù),CROSSDOT,LINETHICK3,畫淡紅色
輸出S1賣:如果賣1>0,返回最高價+0.02,否則返回?zé)o效數(shù),CROSSDOT,LINETHICK3,畫黃色
輸出 S2賣:如果賣線上穿買線,返回最高價+0.02,否則返回?zé)o效數(shù),CROSSDOT,LINETHICK3,畫綠色
3.買賣點指標解釋:(疑難函數(shù)指標)
買賣點指標
N1:=7;
LC:=REF(CLOSE,1);
X:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORYELLOW,LINETHICK1;
魔鬼:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1),COLOR00FF00;
魔王:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X),COLOR00FF00;
TJ0:=X=魔王;
TJ1:=X=魔鬼;
TJ2:=X
TJ3:=X>REF(1,X);
JRS1:=DRAWICON(TJ1 AND TJ2,X,1);
JRS2:=DRAWICON(TJ0 AND TJ3,X,2);
DRAWICON(FILTER(JRS1>0,1),L*0.97,1);
DRAWICON(FILTER(JRS2>0,1),H*1.02,2);
N1賦值:7
LC賦值:昨收
X賦值:收盤價-LC和0的較大值的N1日[1日權(quán)重]移動平均/收盤價-LC的絕對值的N1日[1日權(quán)重]移動平均*100,畫黃色,LINETHICK1
輸出魔鬼:當滿足條件X>=N1日內(nèi)X的最高值時,在X位置畫直線起點,,當滿足條件X<=N1日內(nèi)X的最低值時,在X位置畫直線終點,1表示是否延長.,COLOR00FF00
魔王賦值:當滿足條件X>=N1日內(nèi)X的最高值時,在X位置畫直線起點,,當滿足條件X<=N1日內(nèi)X的最低值時,在1位置畫直線終點,X表示是否延長.,COLOR00FF00
TJ0賦值:X=魔王
TJ1賦值:X=魔鬼
TJ2賦值:X<昨日X
TJ3賦值:X>X日前的1
JRS1賦值:當滿足條件TJ1ANDTJ2時,在X位置畫1號圖標
JRS2賦值:當滿足條件TJ0ANDTJ3時,在X位置畫2號圖標
當滿足條件JRS1>0時,在最低價*0.97位置畫1號圖標
當滿足條件JRS2>0時,在最高價*1.02位置畫2號圖標
{買賣點指標}
N1:=7;{設(shè)參數(shù)}
LC:=REF(CLOSE,1);{昨天的收盤價格}
TS:CLOSE-LC,NODRAW;{收盤價格與昨天收盤價格差}
TD1:MAX(TS,0),NODRAW;
{TS和0比較,取其中較大的數(shù)值,。變相過濾掉負數(shù)值,,為下面的X語句做鋪墊}
TD2:ABS(TS),NODRAW;
{求TS的絕對值,這句也是為后面的核心語句X做鋪墊的}
{冷丁看這兩句另人迷惑不解,。前一個是求TS和0之間的較大值,,只要TS為正,那就提出TS,;后一個是求TS的絕對值,。按道理說,在TD1中TS為正值時,,應(yīng)該與TD2中的TS相等}
TDS1:SMA(TD1,N1,1),NODRAW;
TDS2:SMA(TD2,N1,1),NODRAW;
{這四句挺有意思的呢,。前一個是求TS和0之間的較大值,只要TS為正,,那就提出TS,;后一個是求TS的絕對值。按道理說,,在TD1中TS為正值時,,應(yīng)該與TD2中的TS相等,但相等的TD1和TD2在TDS1和TDS2中卻得出不同的結(jié)果,!為什么呢,??,?
是因為SMA這個函數(shù)計算方法的原因呀,!
SMA(X,N,M):X的N日移動平均,M為權(quán)重,如Y=(X*M+Y'*(N-M))/N,這里的Y'是以前連續(xù)的SMA值,,MAX(TS,0)中因為有負數(shù)的時候,,這時的Y'是不計入計算的,所以他的TS值不是連續(xù)的,,要過濾掉很多小于0值時的TS值,,所以他的Y'就小的很多,,這樣才有前后句子中的差別}
X:TDS1/TDS2*100,COLORYELLOW,LINETHICK1;
{上面的所有鋪墊都是為了這個核心語句的。所以這句話的意思就變成了,,用上漲時期的SMA值與總SMA值的百分比做一條曲線,,這條曲線就是X}
魔鬼:DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1),COLOR00FF00;
{如果X的值比N1天內(nèi)最高的X值大或相等,那么就在這個X值處做起點,,這里就涉及到信號漂移問題了,,因為這個做起點處的X值有很多個,(這個可參考我給出的圖表,,看其中的白鉆石標記)但DRAWLINE函數(shù)畫線有個特色,,就是只畫出最后一個符合條件的線段,這樣在實際看盤中就會發(fā)現(xiàn)這根延伸線不斷的變化只有到最后一個符合條件的X值給出后,,才確定在不漂移了,。下半句是說如果X的值比N1天內(nèi)最低的X值小或相等,那么就在這個X值處做終點,。畫出延伸線,。意思跟前半句一樣,也是不斷漂移,,直到最后一個條件給定的X值處才停止飄動,。可參考給定圖表中的綠色線段}
魔王:DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X),COLOR00FF00;
{這句很奇特,,其實看明白了沒有什么,,就是DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,1),COLOR0000FF;的意思,這里我把線變成紅色,,便于圖表中顯示,。DRAWLINE函數(shù)中大于1的數(shù)都認為是1,所以這里的X=1,。其實跟上一個句子一樣,,只是后半句的意思是如果符合條件,就以1{指標中寫的是X}做終點畫延伸線}{可以說DRAWLINE函數(shù)具有未來函數(shù)的表現(xiàn)性質(zhì),,在特定條件下可以表現(xiàn)出來,。未來函數(shù)的判定,同一時間坐標下可以畫出兩條或兩條以上的曲線,。DRAWLINE函數(shù)在這里畫出了兩條以上的曲線}
TJ0:=X=魔王;{X等于最后一個N1日內(nèi)最高的X值}
TJ1:=X=魔鬼;{X等于最后一個N1日內(nèi)最高的X值}
{以上兩句語意相同,,所以在畫面上就總顯示紅綠兩線始終有一個起點}
TJ2:=X
TJ3:=X>REF(1,X);{大于昨天的}
JRS1:DRAWICON(TJ1 AND TJ2,X,1);
{符合條件在X的位置給個紅箭頭,因TJ1的原因,,所以不用過濾也只有一個箭頭,X等于魔鬼線就那一個時候}
JRS2:DRAWICON(TJ0 AND TJ3,X,2);
{符合條件在X的位置給個綠箭頭,,跟上面意思一樣}
{實際表達中這兩句做中間語句了,,并沒有做圖面顯示}
DRAWICON(FILTER(JRS1>0,1),L*0.97,1);
DRAWICON(FILTER(JRS2>0,1),H*1.02,2);
{不知道作者如何思考的,這兩句根據(jù)前面的意思,根本不用過濾語句,,也一樣表達,,比如改成下面的表達式。但作者在這里使用了過濾語句}
改成:
DRAWICON(TJ1 AND TJ2,L*0.97,1);
DRAWICON(TJ0 AND TJ3,H*1.02,2);
所以全篇也可以這樣表達:
N1:=7;
LC:=REF(CLOSE,1);
TS:=CLOSE-LC;
TD1:=MAX(TS,0);
TD2:=ABS(TS);
TDS1:=SMA(TD1,N1,1);
TDS2:=SMA(TD2,N1,1);
X:=TDS1/TDS2*100;
魔鬼:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),X,1);
魔王:=DRAWLINE(X>=HHV(X,N1),X,X<=LLV(X,N1),1,X);
DRAWICON(X=魔鬼,L*0.97,1);
DRAWICON(X=魔王,H*1.02,2);{條件轉(zhuǎn)移顯示}
4.無敵操盤線指標解釋
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
STICKLINE(VAR2 < MA(VAR3,6),LOW,HIGH,0,1),COLORLIBLUE;
STICKLINE(VAR2 > MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN>CLOSE)AND(VAR2
COLORLIBLUE;
STICKLINE(((OPEN
COLORLIBLUE;
STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),2,0),COLORRED;
STICKLINE(((OPENMA(VAR3,6))),OPEN,CLOSE,2,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.02)),8);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
強:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH>強,(強-CDP)*0.618+CDP,NH)NODRAW,COLORBLUE;
M:=IF(AL
撐:IF(NL
底:IF(AL
該指標的核心是VAR2和VAR3兩條線的變化,,根據(jù)兩線之間的關(guān)系,,決定波段買賣操作。也屬于均線類原理指標,。
短線操盤指標解釋
N:=IF(BARSCOUNT(C)>=10,10,BARSCOUNT(C));
N賦值:如果收盤價的有效數(shù)據(jù)周期數(shù)>=10,返回10,否則返回收盤價的有效數(shù)據(jù)周期數(shù)
{限制語句,,如果上市時間不足10天就用上市時間做N值,否則采用10}
STICKLINE(C>=MA(C,N),MA(C,N),MA(C,N*0.7),4,0),COLORYELLOW;
當滿足條件收盤價>=收盤價的N日簡單移動平均時,在收盤價的N日簡單移動平均和收盤價的N*0.7日簡單移動平均位置之間畫柱狀線,寬度為4,0不為0則畫空心柱.,畫黃色
{如果收盤價格大于等于N日的平均價格,,就在N日的平均價格與0.7個N日時的平均價格之間畫黃色柱線}
STICKLINE(C
當滿足條件收盤價<收盤價的N日簡單移動平均時,在收盤價的N日簡單移動平均和收盤價的N*0.7日簡單移動平均位置之間畫柱狀線,寬度為4,0不為0則畫空心柱.,畫藍色
{如果收盤價格小于N日的平均價格,,就在N日的平均價格與0.7個N日時的平均價格之間畫藍色柱線}
DRAWKLINE(H,O,L,C);
{畫K線}
這個指標是使用了7日和10日均線金死叉的方式表達市場短線波變化規(guī)律的。
書寫源碼類指標{通達信}
研究類指標:
公開發(fā)布68000元智慧王私募版指標之二 黑馬圖(源碼)
{黑馬圖--副圖}
個股:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLOR1010FF;
大盤:EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV
(INDEXL,34)),3),COLORE67010,LINETHICK2;
STICKLINE(個股>=大盤,個股,大盤,1,0),COLORRED;
STICKLINE(個股<大盤,個股,大盤,1,0),COLORBLUE;
STICKLINE(個股>=大盤,0,大盤,6,0),COLORYELLOW;
STICKLINE(個股<大盤,0,個股,6,0),COLORYELLOW;
短線反彈:IF(CROSS(個股,9),50,0),STICK,LINETHICK3,COLOR00FF00;
DRAWTEXT(CROSS(個股,9),40,'短線反彈,!'),COLOR00FF00;
VAR1:=EMA(CLOSE,3);
VAR2:=EMA(CLOSE,21);
VAR3:=BARSLAST(CROSS(VAR2,VAR1))>15;
VAR4:=VOL>MA(VOL,5)*2 AND VOL
VAR5:=CROSS(VAR1,VAR2) AND VAR4 AND VAR3;
黑馬:IF(VAR5,80,0),STICK,LINETHICK4,COLORF00FF0;
DRAWTEXT(VAR5,70,'黑馬,!'),COLORF00FF0;
{通達信主圖公式------波浪買賣(原碼)
波浪買賣--主圖 }
均衡:=IF (YEAR<=2017,IF(YEAR<2017, EMA(EMA(CLOSE,5),5),IF(YEAR=2017 AND MONTH<10, EMA(EMA
(CLOSE,5),5),1000)),1000);
中軌:=HHV(MA(HIGH,13),13);
趨勢:=LLV(MA(HIGH,13),1);
VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);
VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2:=REF(VAR1,1);
VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;
VAR4:=(IF(COUNT(VAR3<20,5)>=1 AND COUNT(VAR1=LLV(VAR1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND
VOL>MA(VOL,5)*1.2,1,0));
VAR5:=(均衡>REF(均衡,1)AND 中軌REF(CLOSE,1));
趨勢向上:=IF (MA(CLOSE,1)>MA(CLOSE,2) AND MA(CLOSE,2)>MA(CLOSE,3),1,0);
出擊A:=IF (VAR5 AND 趨勢向上 ,100,0);
均衡A:=BARSLAST(出擊A>0);
A:=REF(均衡A,1)>5 AND 出擊A>0;
CALF:=EMA((C/REF(C,10)-1)*100,5);
CALF1:=EMA((C/REF(C,10)-1)*100,30);
CALF2:=EMA((C/REF(C,10)-1)*100,120);
CALF3:=CROSS(CALF,CALF1);
B1F:=IF (YEAR>2005 AND CALF3>0,1,0);
D1F:=IF(REF(CLOSE,1)
C1F:=IF((CLOSE-REF(CLOSE,1))/CLOSE*100>3.6,1,0);
AFF:=IF(B1F AND C1F AND D1F ,1,0);
FLY1:=FORCAST(CLOSE,8);
FLY2:=HHV(FLY1,18);
FLY3:=EMA(COST(5),17);
FLY4:=(CLOSE+OPEN)*0.75/2;
FLY5:=CROSS(FLY3,FLY4);
CBPZ:=IF (A OR AFF OR FLY5,1,0);
CBPYY:=BARSLAST(CBPZ>0);
ZJMR1:=REF(CBPYY,1)>5 AND CBPZ>0;
ZJMR2:=IF (CROSS(ZIG(3,7),REF(ZIG(3,7),1)),1,0);
HHH:=30;
CCVAR2:=REF(LOW,1);
CCVAR3:=SMA(ABS(LOW-CCVAR2),3,1)/SMA(MAX(LOW-CCVAR2,0),3,1)*100;
CCVAR4:=EMA(IF(CLOSE*1.2,CCVAR3*10,CCVAR3/10),3);
CCVAR5:=LLV(LOW,HHH);
CCVAR6:=HHV(CCVAR4,HHH);
CCVAR7:=IF(LLV(LOW,58),1,0);
CCVAR8:=EMA(IF(LOW<=CCVAR5,(CCVAR4+CCVAR6*2)/2,0),3)/618*CCVAR7;
DY11:=(2*CLOSE+HIGH+LOW)/4;
DY12:=LLV(LOW,34);
DY13:=HHV(HIGH,13);
A11:=MA((DY11-DY12)/(DY13-DY12)*100,13);
B11:=EMA((0.668*REF(A11,1)+0.333*A11),2);
DY1:=(2*CLOSE+HIGH+LOW)/4;
DY2:=LLV(LOW,34);
DY3:=HHV(HIGH,13);
DYA:=EMA((DY1-DY2)/(DY3-DY2)*100,30);
DYB:=EMA(DYA,7);
A1:=EMA((DY1-DY2)/(DY3-DY2)*100,9);
B1:=EMA((0.667*REF(A1,2)+0.333*A1),2);
買入:=IF(CROSS(A1,B1)AND A1<25,35,0);
關(guān)注A:=IF (YEAR<=2017,IF(YEAR<2017, IF(CROSS(A11,B11)AND A11<25,40,20),IF(YEAR=2017 AND
MONTH<10, IF(CROSS(A11,B11)AND A11<25,40,20),1000)),1000);
CCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);
CCCVAR99:=IF (REF(CCVAR8,1)>1 AND CCVAR8<1, 1,0);
AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF (YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 AND
MONTH<10,REF(AF,1),0)),0);
STICKLINE(AF>BF,AF,BF,6,0),COLORYELLOW;
STICKLINE(AF
{送上最實用的指標---不求人}
VAR1:=(EMA(C,12)-EMA(C,26))*100+50;
VAR2:=EMA(VAR1,9);
VAR3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;
VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR5:=SMA(VAR4,13,8);
VAR6:=SMA(VAR3,21,8);
VAR7:=MA(C,80)-MA(C,10)/7;
VAR8:=EMA(C,5);
VAR9:=MA((LLV(C,9))*1.1,14);
VAR10:=2*VAR9-VAR8-C*0.1;
VAR11:=IF(((VAR8-VAR10)*5>0),(POW((VAR8-VAR10)*5,2))/10,(-1*(POW((VAR8-VAR10)*(5),2)))/(10));
VAR12:=IF((VAR11>0),VAR11-0,12);
VAR13:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
趨勢:CEILING(SMA(VAR5,13,8)),LINETHICK2,COLOR0000FF;
看底:IF((趨勢-VAR6<(-65)),1,6),COLOR00FF00;
頂峰:IF((趨勢-VAR6>85),95,100),COLORF0F000;
黃金區(qū): DRAWICON(IF(VAR13<15,15,0),13,12),COLORYELLOW;
操盤線: MA(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),5),LINETHICK2,COLORBLUE;
STICKLINE(FILTER(趨勢75 OR CROSS(趨勢,操盤線)AND 趨勢60,5),100,60,8,1),COLORFFFF00;
STICKLINE(FILTER(CROSS(趨勢,VAR12)AND 趨勢REF(C,1) OR 趨勢>REF(趨勢,1)AND 趨勢<35 AND C>REF(C,1),5),5,50,9,2),COLOR00FF00;
{通達信主圖公式------蝴蝶專用操作(源碼)}
{M1 2.00 1000.00 5.00 M2 2.00 1000.00 10.00 M3 2.00 1000.00 20.00 M4 2.00 1000.00 60.00}
MA7:MA(CLOSE,M1);
MA13:MA(CLOSE,M2);
MA21:MA(CLOSE,M3);
MA49:MA(CLOSE,M4);
FLY1: MA(CLOSE,5),;
FLY2: MA(CLOSE,10),;
VAR2:=CROSS(MA(CLOSE,5),MA(CLOSE,30));
DRAWICON(VAR2,LOW-LOW*0.01,1);
DRAWTEXT(VAR2 AND CLOSE>MA(CLOSE,1),LOW-LOW*0.02,'←少量買 '),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE>=MA(CLOSE,30) AND CLOSE<=MA(CLOSE,250),LOW-LOW*0.02,'←半倉買'),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,15),5)),LOW*0.99,'↑B') , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.009,'↓S') , COLORGREEN,LINETHICK1;
最強最準的反璞歸真指標:“短、中,、長神奇三均線”(主圖)
3日,、13日、34日成本均線分別代表3日,、13日,、34日的市場平均建倉成本(即日,周,,月線)
34日成本均線也有較好的支撐和壓力作用,,中等力度的回調(diào)一般都無法突破34日成本均線。
我會再加一個90日均線是市場震蕩的底部,受到支撐就要反彈,若跌破就暫時休息吧
短期成本均線隨價格波動比較明顯,,支撐和壓力作用減弱,,但比較起來仍比同時間的移動均線的表現(xiàn)好。
1,、中等力度的反彈及回調(diào)均難破34日成本均線,,股價上漲過程中可用該線判斷主力震倉、整理或出貨,,如是震倉或整理,,則不會跌破34日成本均線,若是出貨則一定會跌破該線,。
2,、股價在34日成本均線上方橫盤稱強勢橫盤,有莊托盤,,后市能創(chuàng)新高,。
3,、股價在34日成本均線下方橫盤稱弱勢橫盤,無莊關(guān)照,,后市則久盤必跌,。
4、在拉升過程中,,如在股價上穿13日成本均線時買入,,下破13日成本均線時賣出是較溫和但絕對安全的獲利方法,但此方法在盤整行情中不可使用,。
5,、使用成本均線做賣出止損點,要在前三條線中,,選本輪行情上升以來從未被破位的那條,。
6、股跌破3日成本均線,,其它股跌破13日成本均線是大盤中級頂部,。3日線上穿13日線買入,溫和放量,二次金叉更佳
7、短期服從長期線,更易把握趨勢,。
具體就看圖吧
可見34日成本平均線比較的關(guān)鍵,,90就是大底了
短線主要看3日線和13日線(參考第6條)
具體就自己參悟吧
主圖公式------只贏操盤手(源碼)
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14))));
VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
AMA1:EMA(DMA(CLOSE,CQ1),2) ,COLORWHITE;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
AMA2:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;
AMA3:IF(AMA2/REF(AMA2,1)>0.997,AMA2,DRAWNULL),COLORYELLOW,LINETHICK2;
AMA4:IF(AMA2/REF(AMA2,1)>1.001,AMA2,DRAWNULL),COLORRED,LINETHICK2;
STICKLINE((VAR2 < MA(VAR3,6)),CLOSE,OPEN,3,1),COLOR008000;
STICKLINE((VAR2 > MA(VAR3,6)),OPEN,CLOSE,3,1),COLORRED;
STICKLINE(((OPEN > CLOSE) AND (VAR2 > MA(VAR3,6))),(OPEN * 0.998),(CLOSE * 1.0001),2.3,0),COLOR008000;
STICKLINE(((OPEN < CLOSE) AND (VAR2 < MA(VAR3,6))),(CLOSE * 0.998),(OPEN * 1.002),2.3,0),COLORRED;
STICKLINE(((OPEN > CLOSE) AND (VAR2 < MA(VAR3,6))),CLOSE,OPEN,2.3,0),COLOR008000;
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.04)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.03)),8);
PT:=REF(H,1)-REF(L,1);
CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
強:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH>強,(強-CDP)*0.618+CDP,NH)NODRAW,COLORCYAN;
M:=IF(AL
撐:IF(NL
底:IF(AL
超強版五線(源碼)
超強版五線主圖(無未來)簡單實用
短期線:EMA(CLOSE,6);
持股線:EMA(CLOSE,14);
生命線:EMA(CLOSE,26);
雙月線:EMA(CLOSE,56);
牛熊線:EMA(CLOSE,166);
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8,'∠35上升'),COLORYELLOW;
支撐:MA(REF(LLV(C,30),1),2),COLORABFF46;
MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
買:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(買=1,5),LOW-0.03,'抄底'),COLORYELLOW;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARFREF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'大資金活動'),LINETHICK1,COLORFF00FF;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
Z1:=MA(C,13);
ZX:=REF(Z1,13/2+1);
DRAWICON(CROSS(ZX,C),H*1.01,2);
DRAWTEXT(CROSS(88,RSI),HIGH * 1.02,'▼逃頂'),COLOR00FFFF;
通達信主圖公式------操盤線(源碼)
{M1 2.00 1000.00 5.00 M2 2.00 1000.00 10.00 M3 2.00 1000.00 20.00 M4 2.00 1000.00 30.00 M5 2.00 1000.00 60.00}
MA5:MA(CLOSE,M1);
MA10:MA(CLOSE,M2);
MA20:MA(CLOSE,M3);
MA30:MA(CLOSE,M4);
MA60:MA(CLOSE,M5);
VAR2:=CROSS(MA(CLOSE,5),MA(CLOSE,30));
DRAWICON(VAR2,LOW-LOW*0.01,1);
DRAWTEXT(VAR2 AND CLOSE>MA(CLOSE,1),LOW-LOW*0.02,'←少量買 '),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE>=MA(CLOSE,60) AND CLOSE<=MA(CLOSE,250),LOW-LOW*0.02,'←半倉買'),COLORYELLOW;
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,15),5)),LOW*0.89,'↑B') , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.009,'↓S') , COLORGREEN,LINETHICK1;
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12)>0 AND EMA(CLOSE,12)/LOW>1.15,5),
LOW,'買'),COLORFF00FF;
DRAWTEXT(FILTER(EMA(CLOSE,12)-EMA(CLOSE,60)>0 AND HIGH/EMA(CLOSE,12)>1.15,5),
HIGH,'堅決出局'),COLORYELLOW;
通達信主圖公式------正的陰陽線(源碼)
主圖 真正的陰陽線
{至簡○ 主圖 真正的陰陽線}
LYA1:=IF(H>REF(HHV(H,3),1) AND C>REF(C,1),LLV(L,3),IF (L
HHV(H,3),DRAWNULL));
LYA:=IF(LYA1=DRAWNULL,REF(LYA1,1),LYA1);
SNX2:=IF(LYALYA>L,REF(LYA,1),LYA);
BB:=PLOYLINE(C>0,SNX2),COLORGREEN,LINETHICK1;
DRAWICON(CROSS(C,BB),(C+O)/2,1);
DRAWICON(CROSS(BB,C),(C+O)/2,2);
中: EMA(EMA(EMA(HIGH,7.23379625),7.23379625),1),COLORLIBLUE,LINETHICK1;
中斜:=(EMA(中,2)-REF(EMA(中,2),2))/REF(EMA(中,2),2)*100,NODRAW;
IF(中斜>=0,中,DRAWNULL),COLORRED,LINETHICK2;
下1: 中*0.9276620375,COLORYELLOW,LINETHICK1;
下2: 中*0.868055,COLORYELLOW,LINETHICK1; {0.9}
下3:中*0.8263889,COLORYELLOW,POINTDOT;
上1:中*1.0723379625,COLORYELLOW,LINETHICK1;
上2: 中*1.12170138,COLORYELLOW,LINETHICK1;
上3:中*1.1694444444,COLORYELLOW,POINTDOT;
MACD:="MACD.MACD#DAY"(12,26,9);
周MACD:="MACD.MACD#WEEK"(12,26,9);
IF(MACD>=0,下1,DRAWNULL),COLORRED,LINETHICK2;
IF(周MACD>=0,下2,DRAWNULL),COLORRED,LINETHICK2;
DRAWTEXT((C-MA(C,13))/MA(C,13)*100<-20 AND C<下3,L,'建');
DRAWTEXT(FILTER(CROSS(MACD,0)OR CROSS(周MACD,0),3),L*0.99,'小加')COLORWHITE;
DRAWTEXT(COUNT(MACD>=0 AND 周MACD>=0 AND 中斜>=0,5)=1 AND MACD>=0 AND 周MACD>=0 AND 中斜>=0,L*0.96,'大加')COLORMAGENTA;
DRAWTEXT(FILTER(CROSS(0,MACD) OR CROSS(0,周MACD) OR CROSS(0,中斜),5),H*1.05,'減')COLORGREEN;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
通達信主圖公式------政策策略(源碼)
平衡:EMA(C,20),CIRCLEDOT,COLORWHITE;
上軌:平衡 + 2*STD(C,20),LINETHICK2,COLORFF00FF;
下軌:平衡 - 2*STD(C,20),LINETHICK2,COLOR00FF00;
STICKLINE((CLOSE >平衡),平衡,平衡,1,0),LINETHICK6,COLOR0000FF;
STICKLINE((平衡 > CLOSE),平衡,平衡,1,0),LINETHICK6,COLORFF6600;
STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOR0000FF;
STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLORFF7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLORFF9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLORFFBB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLORFFCC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFFDD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFFEE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORFFFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
VAR9Q:=C= HHV(C,4)AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);
紅持:VAR9Q,COLOR0000FF,LINETHICK0;
STICKLINE(VAR9Q,C,(O+C)/2,7,0),COLOR000055;
STICKLINE(VAR9Q,C,(O+C)/2,6,0),COLOR000066;
STICKLINE(VAR9Q,C,(O+C)/2,5,0),COLOR000077;
STICKLINE(VAR9Q,C,(O+C)/2,4,0),COLOR000099;
STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR0000BB;
STICKLINE(VAR9Q,C,(O+C)/2,2,0),COLOR0000DD;
STICKLINE(VAR9Q,C,(O+C)/2,1,0),COLOR0000FF;
VARAQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
粉變:VARAQ,COLORFF99FF,LINETHICK0;
STICKLINE(VARAQ,C,(O+C)/2,7,0),COLORFF11FF;
STICKLINE(VARAQ,C,(O+C)/2,6,0),COLORFF33FF;
STICKLINE(VARAQ,C,(O+C)/2,5,0),COLORFF55FF;
STICKLINE(VARAQ,C,(O+C)/2,4,0),COLORFF77FF;
STICKLINE(VARAQ,C,(O+C)/2,3,0),COLORFF99FF;
STICKLINE(VARAQ,C,(O+C)/2,2,0),COLORFFBBFF;
STICKLINE(VARAQ,C,(O+C)/2,1,0),COLORFFDDFF;
Y1:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9),3),1);
DRAWTEXT(CROSS(CLOSE,Y1),LOW,'[買進]'),COLORYELLOW;
STICKLINE(CROSS(Y1,CLOSE),H*1.05,H,1,0),COLORWHITE;
DRAWTEXT(CROSS(Y1,CLOSE),HIGH*1.05,'[賣出]'),COLORWHITE;
VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW -0.6,'(買)'),COLORFF99FF;
DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH +0.9,'(賣)'),COLORCCFF13;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L,L*0.92,1,0),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追漲'),COLORFF00FF;
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)
SC:=LHHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS,2);
買:=MR AND NOT(REF(MR,1)),COLORYELLOW;
STICKLINE(買,L,L*0.95,1,0),COLORRED;
DRAWTEXT(買,L*0.95, '必漲'),COLORRED;
多方:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)
-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)
,3,1),2,1);
STICKLINE(CROSS(78.89,多方),H+1.5,H,1,0),COLOR00FF00;
DRAWTEXT(CROSS(78.89,多方),H+1.5,'(逃頂)'),COLOR00FF00;
通達信主圖公式------真正的陰陽線 (源碼)
{至簡一 主圖 真正的陰陽線}
D:=EMA((C*3+H+L+O)/6,5);
買賣:D,COLORGREEN,LINETHICK2;
A線:HHV(D,13)COLORYELLOW,LINETHICK2;
B線:LLV(D,13)COLORYELLOW,LINETHICK2;日平:="MACD.MACD#DAY"(12,26,9);
周平:="MACD.MACD#WEEK"(12,26,9);
JC:=(A線-B線);
IF(日平>=0,A線,DRAWNULL),COLORRED,LINETHICK2;
IF(周平>=0,B線,DRAWNULL),COLORRED,LINETHICK2;
壹:=COUNT(JC>REF(JC,1)AND A線>REF(A線,1),5)=1 AND JC>REF(JC,1)AND A線>REF(A線,1)AND D>=REF(D,1);
G1:=FILTER(壹=1,10);
G2:=BARSLAST(G1>0);
G3:=IFF(G2>0 AND G2<=10,1,0)=1 AND ((C-REF(C,G2))/REF(C,G2))*100>=5;
概壹:(SUM(FILTER(G3,10),0)/SUM(G1>0,0))*100,NODRAW;
加1:=COUNT(日平>=0 AND 周平>=0,5)=1 AND 日平>=0 AND 周平>=0;
加2:=FILTER(D=A線 AND REF(D,1)
①:=FILTER(加1=1,10);
②:=BARSLAST(①>0);
③:=IFF(②>0 AND ②<=10,1,0)=1 AND ((C-REF(C,②))/REF(C,②))*100>=5;
概加1:(SUM(FILTER(③,10),0)/SUM(①>0,0))*100,NODRAW;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
DRAWTEXT(FILTER(D=A線 AND REF(D,1)
DRAWTEXT(COUNT(日平>=0 AND 周平>=0,5)=1 AND 日平>=0 AND 周平>=0,L*0.96,'♂兩成艙位')COLORRED;
DRAWTEXT(FILTER(COUNT(D=B線,3)>=2 AND D>B線,5),L*0.95,'全倉')COLORRED;
DRAWTEXT(FILTER(CROSS(0,日平) OR CROSS(0,周平) OR (A線=REF(A線,1)AND D
DRAWICON(COUNT(JC>REF(JC,1)AND A線>REF(A線,1),5)=1 AND JC>REF(JC,1)AND A線>REF(A線,1)AND D>=REF(D,1),B線,1);
通達信主圖公式------BY一鳴(源碼)
{改成通達信 BY一鳴}
{改成通達信 BY一鳴}
{N(1,10,5)}
VAR1:=(CLOSE - REF(CLOSE,6));
VAR2:=(CLOSE - REF(CLOSE,7));
VAR3:=(CLOSE - REF(CLOSE,8));
VAR4:=(CLOSE - REF(CLOSE,9));
VAR5:=(CLOSE - REF(CLOSE,10));
VAR6:=((((HHV(HIGH,N) - LLV(LOW,N)) / LLV(LOW,N)) * 100) > 8);
DX:=(((((VAR1 + VAR2) + VAR3) + VAR4) + VAR5) / 5);
ZX:=MA(DX,5);
CX:=MA(DX,21);
MA5:MA(CLOSE,5),COLOR00FFFF;
MA10:MA(CLOSE,10),COLORFFFF00;
MA20:MA(CLOSE,20),LINETHICK2,COLORFF00FF;
MA60:MA(CLOSE,60),COLOR0000FF;
MA120:MA(CLOSE,120),COLORFFFFFF;
VAR11:=(((CLOSE - LLV(LOW,60)) / (HHV(HIGH,60) - LLV(LOW,60))) * 100);
VAR21:=SMA(VAR11,5,1);
VAR31:=SMA(VAR21,10,1);
VAR41:=CROSS(VAR31,VAR21);
VAR51:=((VAR31 > 80) OR (VAR21 > 80));
VAR61:=(VAR41 AND VAR51);
VAR71:=EMA(((AMOUNT / VOL) / 100),3);
VAR81:=EMA(VAR71,88);
VAR91:=(EMA(VAR71,88) * 0.85);
VARA:=(VAR91 * 0.87);
VARB:=((LOW < VARA) AND (CLOSE > (REF(CLOSE,1) * 1.02)));
DRAWTEXT(FILTER(VARB,6),(LOW - 1.2),'★買'),COLOR6600FF LINETHICK2;
僅供參考:STICKLINE(VAR61,HIGH,HIGH,18,1),COLOR00FF00;
DRAWTEXT(FILTER(CROSS(69,((SMA(MAX((CLOSE - REF(CLOSE,1)),0),8,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),8,1)) * 100)),10),(HIGH + 0.46),'★賣 '),COLORFFFF00;
DRAWTEXT(FILTER(CROSS((0 - 5),MA((((LLV(LOW,45) - CLOSE) / (HHV(HIGH,45) - LLV(LOW,45))) * 100),5)),5),(LOW - 1.0),'★買'),COLOR00FFFF;
STICKLINE((CLOSE > OPEN),H,LOW,0.1,0),COLOR0000CC;
STICKLINE((OPEN >= CLOSE),H,LOW,0.1,0),COLORFFFF00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,3,0),COLORFFFF00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,0.1,0),COLORFFFFFF;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,3,0),COLOR0033CC;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,0.1,0),COLORFF00FF;
金睛N主圖(源碼)
有效識破主力洗盤,牛股一騎到底,!
{通達信 火眼金睛 主圖 東郭改編 真正的陰陽線}
STICKLINE(C>REF(C,1),H,L,0,0),COLOR0000FF;
STICKLINE(C>REF(C,1),O,C,3.1,1),COLOR000066;
STICKLINE(C>REF(C,1),O,C,2.6,1),COLOR000099;
STICKLINE(C>REF(C,1),O,C,2,1),COLOR0000CC;
STICKLINE(C>REF(C,1),O,C,1.2,1),COLOR0000FF;
STICKLINE(C>REF(C,1),O,C,0.4,1),COLORCC66FF;
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C=REF(C,1),H,L,0,0),COLORFFFFFF;
STICKLINE(C=REF(C,1),O,C,3.1,1),COLOR777777;
STICKLINE(C=REF(C,1),O,C,2.6,1),COLOR999999;
STICKLINE(C=REF(C,1),O,C,2,1),COLORBBBBBB;
STICKLINE(C=REF(C,1),O,C,1.2,1),COLORDDDDDD;
STICKLINE(C=REF(C,1),O,C,0.4,1),COLORFFFFFF;
A0:=(L+H+C*2)/4;
工作:EMA(A0,14)COLORYELLOW,LINETHICK1;
度假:EMA(A0,25)COLORGREEN,LINETHICK2;
A1X:=(工作-REF(工作,1))/REF(工作,1)*100;
A2X:=(度假-REF(度假,1))/REF(度假,1)*100;
G:=BARSLAST(CROSS(A1X,0));
買入止損:REF(A0,G),COLORWHITE,LINETHICK1;
A2:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5);
A4:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;
A5:=EMA(CLOSE,12)-EMA(CLOSE,26);
A6:=EMA(A5,9);
A7:=(A5<-0.1 AND A5>A6);
財神:IF(A7,LLV(L,21),DRAWNULL)COLORRED,CIRCLEDOT;
DRAWICON(CROSS(A2,EMA(A2,5)) AND (A4-EMA(A2,5))>40 AND A7,LLV(L,21)*1.02,1);
STICKLINE(C>REF(C,1)*1.09,C,O,3.1,0)COLOR000055;
STICKLINE(C>REF(C,1)*1.09,C,O,2.6,0)COLOR000077;
STICKLINE(C>REF(C,1)*1.09,C,O,2.1,0)COLOR000099;
STICKLINE(C>REF(C,1)*1.09,C,O,1.5,0)COLOR0000BB;
STICKLINE(C>REF(C,1)*1.09,C,O,0.9,0)COLOR0000DD;
STICKLINE(C>REF(C,1)*1.09,C,O,0.3,0)COLOR0000FF;
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
減:IF(A2X>=0,度假,DRAWNULL),COLORMAGENTA,LINETHICK2;
少:IF(A1X>=0,工作,DRAWNULL),COLORRED,LINETHICK2;
操:IF(A1X>=0,買入止損,DRAWNULL),LINETHICK2,COLORRED;
作:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,DRAWNULL),COLORGREEN,POINTDOT;
順:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,DRAWNULL),COLORGREEN,POINTDOT;
應(yīng):IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,DRAWNULL),COLORGREEN,CIRCLEDOT;
趨:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,DRAWNULL),COLORGREEN,POINTDOT;
勢:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,DRAWNULL),COLORGREEN,POINTDOT;
破:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.6,REF(A0,BARSLAST(CROSS(A1X,0)))*1.6,DRAWNULL),COLORGREEN,POINTDOT;
位:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.7,REF(A0,BARSLAST(CROSS(A1X,0)))*1.7,DRAWNULL),COLORGREEN,POINTDOT;
出:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.8,REF(A0,BARSLAST(CROSS(A1X,0)))*1.8,DRAWNULL),COLORGREEN,POINTDOT;
C2:=REF(C,1);
漲停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(漲停,OPEN,CLOSE,1.5,0),COLORRED;
STICKLINE(漲停,H,L,0,0),COLORRED;
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
通達信主圖公式:纏論中樞
{N1:1,100,10;N2:1,100,10;DISP:=1,3,2};
N1:=10;N2:=10;DISP:=2;
K:=IF(PERIOD=5,1,{日}
IF(PERIOD=6,1,{周}
IF(PERIOD=7,1,{月}
IF(PERIOD=8,1,{多分鐘}
IF(PERIOD=9,1,{多日}
IF(PERIOD=10,1,{季}
IF(PERIOD=11,2,{年}
IF(PERIOD=4,1,{60F}
IF(PERIOD=3,1,{30F}
IF(PERIOD=2,1,{15F}
IF(PERIOD=1,1{5F},1{1F})))))))))))/10;
P1:=PEAK(1,K*N1,1);
P2:=PEAK(1,K*N1,2);
WP1:=PEAKBARS(1,K*N1,1);
WP2:=PEAKBARS(1,K*N1,2);
T1:=TROUGH(2,K*N2,1);
T2:=TROUGH(2,K*N2,2);
WT1:=TROUGHBARS(2,K*N2,1);
WT2:=TROUGHBARS(2,K*N2,2);
TJ1:=P1>T1 AND P2>T2 ;
ZD:=MAX(T1,T2);
ZG:=MIN(P1,P2);
LL:=MIN(T1,T2);
HH:=MAX(P1,P2);
TJ2:=FILTER(ZG>ZD,2);
TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
TJ4:=TJ1&&TJ2&&NOT(TJ3);
TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD
TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8,ZD,DRAWNULL);
ZSG:=IF(TJ8,ZG,DRAWNULL);
ZSH:=IF(TJ8,HH,DRAWNULL);
ZSL:=IF(TJ8,LL,DRAWNULL);
STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;
STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;
DRAWTEXT(DISP=2,ZSH,'中樞'),COLORWHITE;
中樞高:PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED;
中樞低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGREEN;
{中樞最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;
中樞最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;}
趨勢高:PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;
趨勢低:PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;
局部低點預(yù)選A:=BACKSET(LLV(L,5)
局部低點預(yù)選B:=BACKSET(局部低點預(yù)選A=0 AND REF(局部低點預(yù)選A,1)=1,2);
局部低點預(yù)選C:=IF(局部低點預(yù)選B=1 AND REF(局部低點預(yù)選B,1)=0,-1,0);
局部高點預(yù)選A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高點預(yù)選B:=BACKSET(局部高點預(yù)選A=0 AND REF(局部高點預(yù)選A,1)=1,2);
局部高點預(yù)選C:=IF(局部高點預(yù)選B=1 AND REF(局部高點預(yù)選B,1)=0,1,0);
缺口判斷:=IF(L>REF(H,1),1,IF(H
距前高天:=BARSLAST(局部高點預(yù)選C=1);
距前低天:=BARSLAST(局部低點預(yù)選C=-1);
小值周期:=LOWRANGE(L);
大值周期:=TOPRANGE(H);
低保留AA:=IF(局部低點預(yù)選C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)
低保留AB:=IF(局部低點預(yù)選C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判斷,距前高天)=-1 OR LLV(L,距前低天+2)
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L
預(yù)判:=IF((距前低天<4 AND HHV(缺口判斷,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);
判斷:=IF(局部高點預(yù)選C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 預(yù)判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高點預(yù)選C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高點預(yù)選C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判斷,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判斷=1) AND H>REF(L,距前低天+1),1,0);
預(yù)判A:=IF((距前高天<4 AND HHV(缺口判斷,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);
判斷A:=IF(局部低點預(yù)選C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 預(yù)判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);
低保留A:=IF(局部低點預(yù)選C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)
低保留B:=IF(局部低點預(yù)選C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判斷,距前高天)=-1 OR 判斷A=-1),-1,0);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);
預(yù)判X:=IF((距前低天A<4 AND HHV(缺口判斷,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);
判斷X:=IF(局部高點預(yù)選C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 預(yù)判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);
高保留XA:=IF(局部高點預(yù)選C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
高保留XB:=IF(局部高點預(yù)選C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判斷,距前低天A)=1),1,0);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判斷X=1) AND H>REF(L,距前低天A+1),1,0);
預(yù)判XA:=IF((距前高天A<4 AND HHV(缺口判斷,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);
判斷XA:=IF(局部低點預(yù)選C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 預(yù)判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);
低保留XA:=IF(局部低點預(yù)選C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)
低保留XB:=IF(局部低點預(yù)選C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判斷,距前高天A)=-1 OR 判斷XA=-1),-1,0);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);
預(yù)判YX:=IF((距前低天YA<4 AND HHV(缺口判斷,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);
判斷YX:=IF(局部高點預(yù)選C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 預(yù)判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);
高保留YXA:=IF(局部高點預(yù)選C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
高保留YXB:=IF(局部高點預(yù)選C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判斷,距前低天YA)=1),1,0);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判斷YX=1) AND H>REF(L,距前低天YA+1),1,0);
預(yù)判YXA:=IF((距前高天YA<4 AND HHV(缺口判斷,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);
判斷YXA:=IF(局部低點預(yù)選C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 預(yù)判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);
低保留YXA:=IF(局部低點預(yù)選C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)
低保留YXB:=IF(局部低點預(yù)選C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判斷,距前高天YA)=-1 OR 判斷YXA=-1),-1,0);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L
極點保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);
局部極點:IF(極點保留=-1,L,IF(極點保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;
DRAWLINE(極點保留=-1,局部極點,極點保留=1,局部極點,0)COLORLIRED;
DRAWLINE(極點保留=1,局部極點,極點保留=-1,局部極點,0)COLORYELLOW;
DD1:=BARSLAST(ABS(極點保留)!=1);{
DRAWTEXT(極點保留=1,局部極點,'賣'),COLORGREEN;
DRAWTEXT(極點保留=-1,局部極點,'買'),COLORRED;}
MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;
判:IF(MA5