中長(zhǎng)期買賣指標(biāo),測(cè)試之中。希望能給您帶來(lái)收益,歡迎留言反饋建議,以便改進(jìn),實(shí)現(xiàn)多盈 PERIODS:= 21;
scale:=10;
多方趨勢(shì):(L*4+C*3+O*2+H)/scale,colorwhite,Linethick1;
空方趨勢(shì):EMA(多方趨勢(shì),PERIODS),coloryellow,Linethick1;
STICKLINE(多方趨勢(shì)>=空方趨勢(shì),空方趨勢(shì),多方趨勢(shì),2,0),colorred;
STICKLINE((空方趨勢(shì)>多方趨勢(shì)),多方趨勢(shì),空方趨勢(shì),2,0),colorgreen;
金叉:CROSS(多方趨勢(shì),空方趨勢(shì)),nodraw;
死叉:CROSS(空方趨勢(shì),多方趨勢(shì)),nodraw;
DRAWICON(金叉,空方趨勢(shì),'buy');
DRAWICON(死叉,空方趨勢(shì),'SELL');
DRAWTEXT(金叉,空方趨勢(shì)*0.96,'進(jìn)'),COLOR00FFFF;
DRAWTEXT(死叉,多方趨勢(shì)*1.05,'出'),COLOR00FF00;
// 大道七線
HIGH_THRES:=75;
HIGH_RISK:90,nodraw;
PRICE:C,nodraw;
MA5:MA(C,5),nodraw;
MA10:MA(C,10),nodraw;
DIF1:=EMA(CLOSE,12) - EMA(C,26); DEA1:=EMA(DIF1,9);
MACD1:(DIF1-DEA1)*2,nodraw;
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,nodraw;
CCCI:CCI,nodraw;
Zero:0,nodraw,Linethick0;
PASTDAYS:= 5;//向前搜索5天
最新價(jià):=C,nodraw,NOText;
季:=MA(C,60),nodraw,colorcyan;
通:=MA(C,17),nodraw;
子:=MA(C,26),nodraw;
午:=MA(C,100),nodraw;
辰:=MA(C,145),nodraw;
卯:=MA(C,455),nodraw;
申:=MA(C,320),nodraw;
亥:=MA(C,732),nodraw;
S:季>REF(季,1),nodraw;
M:子>REF(子,1),nodraw;
W:MA5>REF(MA5,1),nodraw;
五十金叉: CROSS(MA5,MA10) AND MA5>=REF(MA5,1),nodraw;
五十死叉:= CROSS(MA10,MA5) AND MA5<REF(MA5,1),nodraw;
五十金叉前溯:= COUNT(CROSS(MA5,MA10),PASTDAYS),nodraw;
五十死叉前溯:= COUNT(CROSS(MA10,MA5),PASTDAYS),nodraw;
五十金叉期:五十金叉+五十金叉前溯,nodraw;
五十死叉期:五十死叉+五十死叉前溯,nodraw;
KDJ金叉:CROSS(J,K),nodraw;
KDJ死叉:CROSS(K,J),nodraw;
突破季:=CROSS(C,季) AND C>REF(C,1),nodraw;
突破子:=CROSS(C,子) AND C>REF(C,1),nodraw;
通子金叉:CROSS(通,子) AND 通>REF(通,1),nodraw;
子午金叉:CROSS(子,午) AND 子>REF(子,1),nodraw;
通子金叉前溯:=COUNT(CROSS(通,子),PASTDAYS);
子午金叉前溯:=COUNT(CROSS(子,午),PASTDAYS);
小牛初現(xiàn):CROSS(通,子) AND (通>REF(通,1)) AND MACD>0 AND CCI>100 AND HIGH> MA(C,5) AND 子>REF(子,1) AND 子>REF(子,1) AND C>子 ,nodraw;
蛟龍出海:CROSS(子,午) AND (子>REF(子,1)) AND MACD>0 AND CCI>100 AND HIGH> MA(C,5) AND (子>REF(子,1)) AND 午>REF(午,1) AND 季>REF(季,1) AND C>季 ,nodraw;
小牛初現(xiàn)期:通子金叉+通子金叉前溯,nodraw;
蛟龍出海期:子午金叉+子午金叉前溯,,nodraw;
多方趨勢(shì)前:REF(多方趨勢(shì),1),nodraw;
HIGHRisk:=多方趨勢(shì)> HIGH_THRES OR 空方趨勢(shì)>HIGH_THRES,nodraw;
DRAWICON(通子金叉,多方趨勢(shì)*0.98,24);
DRAWICON(子午金叉,多方趨勢(shì)*1.08,25);
DRAWICON(小牛初現(xiàn),空方趨勢(shì)*0.98,16);
DRAWICON(蛟龍出海,空方趨勢(shì)*0.98,9);
//低吸與預(yù)警區(qū)
RATIO=0.025;
多方勢(shì)增: (REF(多方趨勢(shì),1) < 多方趨勢(shì)),nodraw;
多方勢(shì)減: (REF(多方趨勢(shì),1) > 多方趨勢(shì)),nodraw;
空方勢(shì)增: (REF(空方趨勢(shì),1) < 空方趨勢(shì)),nodraw;
空方勢(shì)減: (REF(空方趨勢(shì),1) > 空方趨勢(shì)),nodraw;
KDJ勢(shì)增:J > REF(J,1),nodraw;
KDJ勢(shì)減:J < REF(J,1),nodraw;
CURRRATIO:ABS((多方趨勢(shì)-空方趨勢(shì))/多方趨勢(shì)),nodraw;
預(yù)警區(qū):=(多方勢(shì)減 AND 空方勢(shì)增 AND (CURRRATIO <RATIO OR ABS(多方趨勢(shì)-空方趨勢(shì)) <0.5));
低吸區(qū):=(多方勢(shì)增 AND 空方勢(shì)減 AND (CURRRATIO <RATIO OR ABS(多方趨勢(shì)-空方趨勢(shì)) <0.5));
STICKLINE(預(yù)警區(qū),空方趨勢(shì),多方趨勢(shì)+0.018,8,0),COLORFF33FF; // COLOR00A5FF(orange);
STICKLINE(低吸區(qū),多方趨勢(shì),空方趨勢(shì)+0.018,8,0),COLOR00FFFF;
春光乍現(xiàn):金叉 OR 小牛初現(xiàn) OR 蛟龍出海,nodraw;
// 紅三兵
DAYS:=3;
倍量:=VOL/REF(VOL,1)>=1.9;
COUNT(倍量,DAYS)>=DAYS;
紅三兵:REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN
AND REF(CLOSE,1)>REF(CLOSE,2) AND
CLOSE>REF(CLOSE,1) AND V>REF(V,1) AND REF(V,1)>REF(V,2)
AND (CLOSE-OPEN)<0.05*REF(OPEN,1) AND (REF(CLOSE,1)-REF(OPEN,1))<0.05*REF(OPEN,2)
AND (REF(CLOSE,2)-REF(OPEN,2))<0.05*REF(OPEN,3),colorred,nodraw;
DRAWICON(紅三兵,空方趨勢(shì)*0.99,11);
DRAWTEXT(紅三兵,空方趨勢(shì)*0.97,'強(qiáng)'),colorred;
DRAWICON(五十金叉,空方趨勢(shì)*0.98,11);
DRAWICON(五十死叉,多方趨勢(shì)*1.08,12);
//低吸與預(yù)警區(qū)
|
|
來(lái)自: 鬼舞十七 > 《技術(shù)指標(biāo)》