指標(biāo)公式源碼分析及使用說(shuō)明:
根據(jù)給出的分析指標(biāo)公式,我們可以得到以下幾個(gè)指標(biāo)的計(jì)算結(jié)果:
1. EMA17(黃色線):以收盤(pán)價(jià)為基準(zhǔn),計(jì)算17日指數(shù)移動(dòng)平均線;
2. EMA50(藍(lán)色線):以收盤(pán)價(jià)為基準(zhǔn),計(jì)算50日指數(shù)移動(dòng)平均線;
3. 買線:以收盤(pán)價(jià)為基準(zhǔn),計(jì)算3日指數(shù)移動(dòng)平均線;
4. 賣線:以收盤(pán)價(jià)為基準(zhǔn),計(jì)算斜率為20的線性函數(shù),并加上40日指數(shù)移動(dòng)平均線。
根據(jù)這些指標(biāo),可以進(jìn)行以下的分析和使用參考建議:
1. 紅白柱買入,藍(lán)綠柱賣出:當(dāng)買線穿越賣線時(shí),可以考慮買入;當(dāng)賣線穿越買線時(shí),可以考慮賣出。
2. 分析紅色持股、離場(chǎng)和品紅離場(chǎng)指標(biāo):通過(guò)判斷連續(xù)的漲跌情況,可以判斷當(dāng)前是否處于持股、離場(chǎng)或品紅離場(chǎng)狀態(tài)。可以根據(jù)這些狀態(tài)來(lái)制定相應(yīng)的交易策略。
3. 青色觀望和進(jìn)場(chǎng)價(jià):通過(guò)判斷連續(xù)的觀望情況,可以判斷當(dāng)前是否處于觀望狀態(tài)。在青色觀望狀態(tài)下,可以考慮以進(jìn)場(chǎng)價(jià)進(jìn)行買入操作。
4. 白色急速超跌:當(dāng)收盤(pán)價(jià)相對(duì)于34日的指數(shù)移動(dòng)平均線下跌超過(guò)14%時(shí),可能存在超跌情況,可以考慮以此作為買入信號(hào)。
5. 辰星線和牽牛線:辰星線是根據(jù)收盤(pán)價(jià)計(jì)算得到的復(fù)雜線性函數(shù),而牽牛線是以收盤(pán)價(jià)為基準(zhǔn),計(jì)算99日的簡(jiǎn)單移動(dòng)平均線。這兩條線可以作為支撐或阻力線,用于判斷股價(jià)的趨勢(shì)。
6. 分析等待指標(biāo):等待指標(biāo)是辰星線與3日移動(dòng)平均線的較大值,可以用來(lái)判斷當(dāng)前是否處于觀望或持股狀態(tài)。
總的來(lái)說(shuō),以上指標(biāo)可以幫助投資者進(jìn)行技術(shù)分析和制定交易策略。但需要注意的是,技術(shù)指標(biāo)只是一種輔助工具,不能單獨(dú)作為決策的依據(jù)。在實(shí)際應(yīng)用中,還需要結(jié)合其他因素綜合考慮,如基本面分析、市場(chǎng)趨勢(shì)等。同時(shí),投資有風(fēng)險(xiǎn),投資者應(yīng)根據(jù)自身的風(fēng)險(xiǎn)承受能力和投資經(jīng)驗(yàn)謹(jǐn)慎決策。
?
源碼:
?
EMA17:EMA(CLOSE,17),Coloryellow;
EMA50:EMA(CLOSE,50),Colorblue;
DRAWTEXTABS(30,0,BKNAME ),colorDDDDDD;
DRAWTEXTABS(30,15,'流通盤(pán):'+CAPITAL/100+'萬(wàn)股,利潤(rùn)增長(zhǎng):'+FINANCE2(10)+'%。每股收益:'+FINANCE2(3)+'元。' ),color00DDDD;
DRAWTEXTABS(30,30,'紅白柱買入,藍(lán)綠柱賣出。' ),colorFFDD00;
買線:EMA(C,3),pointdot,color0000DD;
賣線:EMA(SLOPE(C,20)*20+C,40),pointdot,color00DD00;
BU:=cross(買線,賣線);
SEL:=cross(賣線,買線);
drawtext(bu,LOW*0.985,'B'),colorRED,linethick2;
JH:=SMA(MAX(C-REF(C,1),0),5,1)/SMA(ABS(C-REF(C,1)),5,1)*100;
DRAWTEXT(CROSS(84,JH),H*1.05,'☆S'),COLORGREEN,linethick2;
DRAWGBKLAST(CLOSE>0,STRIP(RGB(50,50,50),RGB(1,1,1),0));
{DRAWGBKLAST(CLOSE>OPEN,STRIP(RGB(255,0,0),RGB(0,255,0),1));}JRH:=HHV(C,2);
JRL:=LLV(C,2);
MA3:=MA(CLOSE,3);
YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
cxh1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
cxh2:=(REF(cxh1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh3:=(REF(cxh2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh4:=(REF(cxh3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh5:=(REF(cxh4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh6:=(REF(cxh5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh7:=(REF(cxh6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh8:=(REF(cxh7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh9:=(REF(cxh8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxhA:=(REF(cxh9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxhB:=(REF(cxhA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxhC:=(REF(cxhB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxhD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
cxhE:=(REF(cxhD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxhF:=(REF(cxhE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh10:=(REF(cxhF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh11:=(REF(cxh10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh12:=(REF(cxh11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh13:=(REF(cxh12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh14:=(REF(cxh13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh15:=(REF(cxh14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh16:=(REF(cxh15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh17:=(REF(cxh16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
cxh18:=(REF(cxh17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
cxh19:=((REF(cxhD OR cxhE OR cxhF OR cxh10 OR cxh11 OR cxh12 OR cxh13 OR cxh14 OR cxh15 OR cxh16 OR cxh17 OR cxh18,1)) AND cxh1);
cxh1A:=((REF(cxh1 OR cxh2 OR cxh3 OR cxh4 OR cxh5 OR cxh6 OR cxh7 OR cxh8 OR cxh9 OR cxhA OR cxhB OR cxhC,1)) AND cxhD);
紅色持股:=IF((cxh1 OR cxh2 OR cxh3 OR cxh4 OR cxh5 OR cxh6 OR cxh7 OR cxh8 OR cxh9 OR cxhA OR cxhB OR cxhC),1,0);
離場(chǎng):=IF(紅色持股,JRL,0);
明離場(chǎng)價(jià):=離場(chǎng);
今離場(chǎng)價(jià):REF(離場(chǎng),1),COLOR0000FF,LINETHICK0;
青色觀望:=IF((cxhD OR cxhE OR cxhF OR cxh10 OR cxh11 OR cxh12 OR cxh13 OR cxh14 OR cxh15 OR cxh16 OR cxh17 OR cxh18),1,0);
進(jìn):=IF(青色觀望,JRH,0);
明進(jìn)場(chǎng)價(jià):=進(jìn);
今進(jìn)場(chǎng)價(jià):REF(明進(jìn)場(chǎng)價(jià),1),COLOR00FF00,LINETHICK0;
短買:=cxh19;
品紅離場(chǎng):=cxh1A;
白色急速超跌:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14;
辰星線: (20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLORGREEN;{http://www.kzuj.com.cn}
牽牛線:MA(CLOSE,99),COLORFF00FF;
等待:=IF(MA3>辰星線,辰星線,MA3);
PARTLINE(等待,等待>REF(等待,1)),LINETHICK2,color0099FF;
PARTLINE(辰星線,辰星線>REF(辰星線,1)),LINETHICK2,color0000FF;
PARTLINE(辰星線,辰星線<REF(辰星線,1)),color00FF00;
PARTLINE(牽牛線,牽牛線>REF(牽牛線,1)),LINETHICK1,colorFF00FF;
PARTLINE(牽牛線,牽牛線<REF(牽牛線,1)),color669933;
STICKLINE(BARSTATUS=2 AND (紅色持股 OR REF(紅色持股,1)=1) AND 今離場(chǎng)價(jià)<>0,今離場(chǎng)價(jià),今離場(chǎng)價(jià),30,1),COLOR0000FF;
STICKLINE(BARSTATUS=2 AND (青色觀望 OR REF(青色觀望,1)=1) AND 今進(jìn)場(chǎng)價(jià)<>0,今進(jìn)場(chǎng)價(jià),今進(jìn)場(chǎng)價(jià),30,1),COLOR00FF00;
STICKLINE(C>=O,L,H,0,0),COLOR0000CC;
STICKLINE(C<O,L,H,0,0),COLOR999900;
STICKLINE(1,C,O,8,0),COLOR858500;
STICKLINE(C>=O,C,O,8,0),COLOR0000E5;
STICKLINE(紅色持股,CLOSE,O,6,0),COLOR000055;
STICKLINE(紅色持股,CLOSE,O,5,0),COLOR000077;
STICKLINE(紅色持股,CLOSE,O,4,0),COLOR0000AA;
STICKLINE(紅色持股,CLOSE,O,3,0),COLOR0000CC;
STICKLINE(紅色持股,CLOSE,O,2,0),COLOR0000EE;
STICKLINE(紅色持股,CLOSE,O,1,0),COLOR0000FF;
STICKLINE(青色觀望,CLOSE,O,6,0),COLOR555500;
STICKLINE(青色觀望,CLOSE,O,5,0),COLOR888800;
STICKLINE(青色觀望,CLOSE,O,4,0),COLORAAAA00;
STICKLINE(青色觀望,CLOSE,O,3,0),COLORCCCC00;
STICKLINE(青色觀望,CLOSE,O,2,0),COLOREEEE00;
STICKLINE(青色觀望,CLOSE,O,1,0),COLORFFFF00;
CO:=(C-O);
STICKLINE(白色急速超跌,O,C-CO/2,6,0),COLOR555555;
STICKLINE(白色急速超跌,O,C-CO/2,5,0),COLOR888888;
STICKLINE(白色急速超跌,O,C-CO/2,4,0),COLORAAAAAA;
STICKLINE(白色急速超跌,O,C-CO/2,3,0),COLORCCCCCC;
STICKLINE(白色急速超跌,O,C-CO/2,2,0),COLOREEEEEE;
STICKLINE(白色急速超跌,O,C-CO/2,1,0),COLORFFFFFF;
STICKLINE(短買,O,O+CO/3,6,0),COLOR335555;
STICKLINE(短買,O,O+CO/3,5,0),COLOR338888;
STICKLINE(短買,O,O+CO/3,4,0),COLOR33AAAA;
STICKLINE(短買,O,O+CO/3,3,0),COLOR33CCCC;
STICKLINE(短買,O,O+CO/3,2,0),COLOR33EEEE;
STICKLINE(短買,O,O+CO/3,1,0),COLOR33FFFF;
DRAWTEXT(短買,LLV(L,3),'←短買'),VALIGN0,COLOR33FFCC;
STICKLINE(品紅離場(chǎng),O,O+CO/3,6,0),COLOR550055;
STICKLINE(品紅離場(chǎng),O,O+CO/3,5,0),COLOR880088;
STICKLINE(品紅離場(chǎng),O,O+CO/3,4,0),COLORAA00AA;
STICKLINE(品紅離場(chǎng),O,O+CO/3,3,0),COLORCC00CC;
STICKLINE(品紅離場(chǎng),O,O+CO/3,2,0),COLOREE00EE;
STICKLINE(品紅離場(chǎng),O,O+CO/3,1,0),COLORFF00FF;
DRAWTEXT(品紅離場(chǎng),HHV(H,3),'←離場(chǎng)'),VALIGN2,COLORFF99FF;{程序化交易 www.kzuj.com.cn }{程序化交易 www.kzuj.com.cn }
?
公式導(dǎo)入教程: 【通達(dá)信公式源碼導(dǎo)入方法教程】 【同花順公式源碼導(dǎo)入方法教程】 【大智慧新一代公式源碼導(dǎo)入方法教程】
?