歐歐 歐歐量化 2023-11-18 08:00 發(fā)表于廣西
一、公式如下: CTA1:=EMA(WINNER(CLOSE)*70,3);CTA2:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);CTA3:=CTA1/(CTA1+CTA2)*100;CTA4:=IF(CTA3<(-6),(-6),IF(CTA3>100,100+SQRT(CTA3-100),CTA3));CTA6:=CTA2/(CTA1+CTA2)*100;主力:EMA(CTA4,89),COLORYELLOW,LINETHICK4;STICKLINE(CTA4>REF(CTA4,1) AND CTA4>20,CTA4,20,2,0),COLOR880099;STICKLINE(CTA4<=REF(CTA4,1) AND CTA4>20,CTA4,20,2,0),COLORCC7700;STICKLINE(CTA4>REF(CTA4,1) AND CTA4<20,CTA4,0,2,0),COLOR131FFD;STICKLINE(CTA4<=REF(CTA4,1) AND CTA4<20,CTA4,0,2,0),COLOR990000;STICKLINE(CTA4>20,20,CTA4,0,0),COLORAAAAAA;STICKLINE(主力>REF(主力,1),CTA4,主力,2,0),COLOR0055DD;STICKLINE(主力>REF(主力,1),CTA4,主力,0.3,0),COLOR00AADD;STICKLINE(CTA4>主力 AND 主力>50,CTA4,主力,2,0),COLOR0000AA;STICKLINE(CTA4>主力 AND 主力>50,CTA4,主力,0.3,0),COLOR0055FF;STICKLINE(CTA4>主力 AND 主力<50 AND CTA4>50 AND 主力>REF(主力,1),CTA4,50,2,0),COLOR0000AA;STICKLINE(CTA4>主力 AND 主力<50 AND CTA4>50 AND 主力>REF(主力,1),CTA4,50,0.3,0),COLOR0055FF;STICKLINE(CTA4<=10,CTA4,0,4,0),COLORDD00DD;STICKLINE(REF(CTA6,1)>90 AND CTA6<90,30,0,2.5,0),COLORRED;DRAWTEXT_FIX(C>O,0.01,0.9,0,'微信公眾號(hào):歐歐量化'),COLORRED;CTA8:=(HHV(HIGH,8)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20))*100;CTA9:=100-3*SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1),15,1);CTA11:=EMA(EMA(SMA(CTA8,6,1)-7,2),2);CTA13:=BARSLAST(LOW=HHV(LOW,7));CTA14:=EMA(CTA13*CTA13,13);CTA15:=IF(CTA14>88,88+SQRT(CTA14-88),CTA14);CTA16:=(CTA15+CTA11+CTA10)/3;CTA17:=(CTA15+CTA16)/2+8;CTA18:=(CTA11+CTA16)/2+8;CTA20:=EMA(EMA(100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42)),2),2);CTA21:=EMA(WINNER(CLOSE)*69,3);CTA22:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.93))*80,3);CTA23:=EMA(CTA21/(CTA21+CTA22)*110,2);CTA26:=100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42));CTA27:=EMA(EMA(CTA26,3),2);CTA28:=EMA(EMA(EMA(CTA26,4),3),2);CTA30:=CTA24/CTA29*(CTA25/CTA29)*50;CTA31:=IF(CTA30>100,100,IF(CTA30<1,1,CTA30));CTA35:=CTA18/REF(CTA18,1);CTA36:=CTA17/REF(CTA17,1);CTA37:=EMA(EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*50/(CTA20/CTA28)/CTA34/CTA35/CTA36,3),2);CTA38:=CTA31*CTA31*5/SQRT(CTA37)/CTA29;CTA39:=IF(CTA38>100,100,CTA38);CTA41:=CTA31/REF(CTA31,1);CTA42:=CTA39/REF(CTA39,1);CTA43:=EMA(CTA40*CTA40*CTA41*CTA42*30,2);CTA44:=IF(CTA43>100,100,IF(CTA43<0,0,CTA43));CTA45:=1.18*(CTA24*CTA25+5)/(CTA31+2)/SQRT(SQRT((CTA44+2)/(CTA31+5)));CTA46:=100-IF(CTA45>90,90+SQRT(CTA45-90),IF(CTA45<1,1,CTA45));CTA47:=EMA(EMA(IF(CTA46<0.5,0.5,CTA46),2),2);CTA48:=EMA(EMA(CTA47*0.96,3),3);DRAWBAND(CTA47,RGB(11,88,55),CTA48,RGB(118,11,33));DRAWICON(CROSS(CTA47,95),95,26);CTA49:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);CTA52:=EXPMEMA(IF(CTA50>0 AND CTA50>CTA51,CTA50,0),14);CTA53:=EXPMEMA(IF(CTA51>0 AND CTA51>CTA50,CTA51,0),14);CTA56:=EMA(100-EMA(ABS(CTA55-CTA54)/(CTA55+CTA54)*CTA23+CTA25,6),3);CTA57:=IF(CTA56<0.5,0.5,IF(CTA56>106,106,CTA56));DRAWBAND(CTA58,RGB(228,33,66),CTA57,RGB(88,118,168));DRAWICON(CROSS(CTA58,CTA57),CTA57,24);風(fēng)險(xiǎn):95,COLORGREEN,LINETHICK1;機(jī)會(huì):60,COLORYELLOW,LINETHICK1; CTA8:=(HHV(HIGH,8)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20))*100;CTA9:=100-3*SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1),15,1);CTA11:=EMA(EMA(SMA(CTA8,6,1)-7,2),2);CTA13:=BARSLAST(LOW=HHV(LOW,7));CTA14:=EMA(CTA13*CTA13,13);CTA15:=IF(CTA14>88,88+SQRT(CTA14-88),CTA14);CTA16:=(CTA15+CTA11+CTA10)/3;CTA17:=(CTA15+CTA16)/2+8;CTA18:=(CTA11+CTA16)/2+8;CTA20:=EMA(EMA(100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42)),2),2);CTA21:=EMA(WINNER(CLOSE)*69,3);CTA22:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.93))*80,3);CTA23:=EMA(CTA21/(CTA21+CTA22)*110,2);CTA26:=100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42));CTA27:=EMA(EMA(CTA26,3),2);CTA28:=EMA(EMA(EMA(CTA26,4),3),2);CTA30:=CTA24/CTA29*(CTA25/CTA29)*50;CTA31:=IF(CTA30>100,100,IF(CTA30<1,1,CTA30));CTA35:=CTA18/REF(CTA18,1);CTA36:=CTA17/REF(CTA17,1);CTA37:=EMA(EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*50/(CTA20/CTA28)/CTA34/CTA35/CTA36,3),2);CTA38:=CTA31*CTA31*5/SQRT(CTA37)/CTA29;CTA39:=IF(CTA38>100,100,CTA38);CTA41:=CTA31/REF(CTA31,1);CTA42:=CTA39/REF(CTA39,1);CTA43:=EMA(CTA40*CTA40*CTA41*CTA42*30,2);CTA44:=IF(CTA43>100,100,IF(CTA43<0,0,CTA43));CTA45:=1.18*(CTA24*CTA25+5)/(CTA31+2)/SQRT(SQRT((CTA44+2)/(CTA31+5)));CTA46:=100-IF(CTA45>90,90+SQRT(CTA45-90),IF(CTA45<1,1,CTA45));CTA47:=EMA(EMA(IF(CTA46<0.5,0.5,CTA46),2),2);黃鉆石圖標(biāo):CROSS(CTA47,95);測(cè)試一下,平倉(cāng)規(guī)則是,不論盈虧,以持股5天后平倉(cāng)為條件,勝率為55.21%風(fēng)險(xiǎn)提示:本指標(biāo)公式僅作為知識(shí)分享,模擬測(cè)試不構(gòu)成任何投資建議,不作投資依據(jù)。
|