指標(biāo)公式源碼分析及使用參考說(shuō)明:
這段代碼主要是使用各種技術(shù)指標(biāo)來(lái)判斷股票的走勢(shì)和買賣點(diǎn),具體包括價(jià)格平均指標(biāo)、加權(quán)平均指標(biāo)、移動(dòng)平均線、價(jià)格動(dòng)量指標(biāo)、資金流入流出指標(biāo)等。
操作使用說(shuō)明如下:
1. 首先需要將這段代碼復(fù)制到量化交易軟件中的策略編輯器中進(jìn)行編譯和運(yùn)行。
2. 在運(yùn)行過(guò)程中,可以通過(guò)可視化展示方式觀察cxh3和cxh4之間的匹配關(guān)系,以及大于1.005倍cxh4的cxh3顯示為紫色的情況。
3. 通過(guò)觀察cxh6的10日移動(dòng)平均線與cxh7的關(guān)系,以及在cxh8處顯示紅色或綠色箭頭來(lái)判斷看漲或看跌信號(hào)。
4. 使用價(jià)格動(dòng)量指標(biāo)、資金流入流出指標(biāo)等各種技術(shù)指標(biāo)來(lái)輔助判斷股票的長(zhǎng)期、短期走勢(shì)和買賣點(diǎn)。
5. 根據(jù)以上分析結(jié)果,制定相應(yīng)的買賣策略進(jìn)行操作。
需要注意的是,使用任何一種技術(shù)指標(biāo)都不能百分之百保證盈利。而且不同的股票在不同的市場(chǎng)環(huán)境下可能會(huì)有不同的表現(xiàn),所以需要根據(jù)實(shí)際情況進(jìn)行靈活調(diào)整和優(yōu)化。
?
源碼:
?
cxh2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
cxh3:=(20*cxh2+19*REF(cxh2,1)+18*REF(cxh2,2)+17*REF(cxh2,3)+16*REF(cxh2,4)+15*REF(cxh2,5)+14*REF(cxh2,6)+13*REF(cxh2,7)+
12*REF(cxh2,8)+11*REF(cxh2,9)+10*REF(cxh2,10)+9*REF(cxh2,11)+8*REF(cxh2,12)+7*REF(cxh2,13)+6*REF(cxh2,14)+5*REF(cxh2,15)
+4*REF(cxh2,16)+3*REF(cxh2,17)+2*REF(cxh2,18)+REF(cxh2,20))/210;
cxh4:=MA(cxh3,13);
cxh5:=EMA(MA(CLOSE,3),34);
cxh6:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
cxh7:=MA(cxh6,5);
cxh8:=MA(cxh6,10);
STICKLINE(IF(cxh3<cxh5,cxh3<=1.015*cxh4,cxh3<=1.005*cxh4),cxh3,cxh4,10,1),COLOR006600 ;
STICKLINE(cxh3>1.005*cxh4,cxh3,cxh4,10,1),COLORFF00FF;
DRAWTEXT(FILTER(MA(cxh6,10)<cxh7,1),cxh8,'↑'),COLORRED;
DRAWTEXT(FILTER(MA(cxh6,10)>=cxh6,1),cxh8,'↓'),COLOR00FF00;
多空安全線: cxh5,COLORWHITE;
〖關(guān)注點(diǎn)〗: STICKLINE(COUNT(cxh3>1.005*cxh4 AND cxh3<=REF(cxh3,1),2)=2 OR
COUNT(IF(cxh3<cxh5,cxh3<=1.015*cxh4,cxh3<=1.005*cxh4) AND cxh3>=REF(cxh3,1),2)=2,cxh3,cxh4,10,0),COLORYELLOW;
DRAWTEXT(REF(CROSS(cxh3,cxh4),2) AND cxh3>1.005*cxh4,cxh4,'買入點(diǎn)'),COLORWHITE;
DRAWTEXT(CROSS(cxh6,cxh7) AND cxh7<cxh8,cxh3*0.95,'▲多空爭(zhēng)奪'),COLORYELLOW;
{DRAWTEXT(CROSS(cxh7,cxh6) AND cxh7>cxh8,cxh3*1.05,'▼洗盤'),COLORWHITE;}
cxh9:=1/WINNER(CLOSE);
cxhA:=MA(CLOSE,13);
cxhB:=100-ABS((CLOSE-cxhA)/cxhA*100);
cxhC:=LLV(LOW,75);
cxhD:=HHV(HIGH,75);
cxhE:=(cxhD-cxhC)/100;
cxhF:=SMA((CLOSE-cxhC)/cxhE,20,1);
cxh10:=SMA((OPEN-cxhC)/cxhE,20,1);
cxh11:=3*cxhF-2*SMA(cxhF,15,1);
cxh12:=3*cxh10-2*SMA(cxh10,15,1);
cxh13:=100-cxh12;
cxh14:=100-cxh11;
cxh15:=MA(WINNER(CLOSE*0.95)*100,3);
cxh16:=100-IF(cxh9>5,IF(cxh9<100,cxh9,cxhB-10),0);
cxh17:=cxh15>cxhB;
cxh18:=REF(LOW,1)*0.9;
cxh19:=LOW*0.9;
cxh1A:=(cxh19*VOL+cxh18*(CAPITAL-VOL))/CAPITAL;
cxh1B:=EMA(cxh1A,30);
cxh1C:=CLOSE-REF(CLOSE,1);
cxh1D:=MAX(cxh1C,0);
cxh1E:=ABS(cxh1C);
cxh1F:=SMA(cxh1D,7,1)/SMA(cxh1E,7,1)*100;
cxh20:=SMA(cxh1D,13,1)/SMA(cxh1E,13,1)*100;
cxh21:=BARSCOUNT(CLOSE);
cxh22:=SMA(MAX(cxh1C,0),6,1)/SMA(ABS(cxh1C),6,1)*100;
cxh23:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
cxh24:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
cxh25:=SMA((SMA(cxh24,4,1)-50)*2,3,1);
cxh26:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
cxh27:=SMA(cxh26,4,1);
cxh28:=SMA(cxh27,3,1);
cxh29:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
cxh2A:=cxh22<=25 AND cxh23<-95 AND cxh29>20 AND cxh25<-30 AND cxh28<30 AND cxh1B-CLOSE>=-0.25 AND cxh1F<22 AND cxh20<28
AND cxh21>50;
DRAWTEXT(CROSS(cxh2A,0.5) AND COUNT(cxh2A=1,10)=1,cxh4,'♂發(fā)射資金'),COLORRED;
DRAWTEXT(CROSS(cxh17,0.5) AND COUNT(cxh17=1,10)=1,cxh3,'激烈交鋒'),COLORWHITE;
cxh326:=IF(CLOSE>REF(CLOSE, 1),88,0);
cxh327:=CLOSE/REF(CLOSE, 1)>1.050AND HIGH/CLOSE<1.010 AND cxh326>0;
STICKLINE(cxh327>90,L*0.99,L*0.95,4,0),COLORYELLOW;
DRAWTEXT(cxh327>90,LOW*0.95,'追漲'),COLORYELLOW;
選股公式:
cxh2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
cxh3:=(20*cxh2+19*REF(cxh2,1)+18*REF(cxh2,2)+17*REF(cxh2,3)+16*REF(cxh2,4)+15*REF(cxh2,5)+14*REF(cxh2,6)+13*REF(cxh2,7)+
12*REF(cxh2,8)+11*REF(cxh2,9)+10*REF(cxh2,10)+9*REF(cxh2,11)+8*REF(cxh2,12)+7*REF(cxh2,13)+6*REF(cxh2,14)+5*REF(cxh2,15)
+4*REF(cxh2,16)+3*REF(cxh2,17)+2*REF(cxh2,18)+REF(cxh2,20))/210;
cxh4:=MA(cxh3,13);
買入點(diǎn):REF(CROSS(cxh3,cxh4),2) AND cxh3>1.005*cxh4;
?
公式導(dǎo)入教程: 【通達(dá)信公式源碼導(dǎo)入方法教程】 【同花順公式源碼導(dǎo)入方法教程】 【大智慧新一代公式源碼導(dǎo)入方法教程】
?