{-------【主力動(dòng)向】主力,散戶(hù)籌碼一目了然,經(jīng)典MACD與KDJ的完美組合!---------}
{-------------------------通達信新分時(shí)源碼廣哥深度優(yōu)化版--------------------}
A:=CURRBARSCOUNT;
A1:=DAY!=REF(DAY,1);
A2:=BARSLAST(A1)+1;
A3:=MA(C,A2);
A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;
A5:=IF(CAPITAL》0,A4,A3);
均價(jià)線(xiàn):=IF(A《=CONST(A2),A5,DRAWNULL);
分鐘有效周期:=IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,DRAWNULL))));
分時(shí)價(jià):=TFILT(CLOSE,CURRBARSCOUNT,00,CURRBARSCOUNT,00);
分時(shí)判斷:=IF(分時(shí)價(jià)=DRAWNULL,1,IF(分鐘有效周期=DRAWNULL,DRAWNULL,1));
{-----------------------------由MACD定位頂底-------------------------------}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
KX:=BARSSINCE(CLOSE);{←首次開(kāi)盤(pán)價(jià)距金的天數}
HHN:=CONST(HHV(DIFF,KX));
HLN:=CONST(LLV(DEA,KX));
RC1:=CONST((HHN+HLN)/2);
SS:=((HHN-HLN)/200);
MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1),COLOR669999;
MACD頂部:=(100*SS+RC1)+-(-100*SS+RC1),COLORFF0033;
MACD中軸:=0+-(-100*SS+RC1);
DIFF修正:=DIFF+-(-100*SS+RC1),COLOR008080;
DEA修正:=DEA+-(-100*SS+RC1),COLOR00FF00;
MACD修正:=2*(DIFF修正-DEA修正)+MACD中軸,COLOR0000BB,NODRAW;
MACD超跌:=CONST(LLV(MACD修正,KX));
MACD超跌線(xiàn):=IF(MACD超跌《MACD底部,MACD超跌,MACD底部);
{----------------------利用MACD趨勢進(jìn)行精確頂底判斷------------------------}
頂部:=MACD頂部+-MACD超跌線(xiàn);
天際:=頂部*0.809;
中軸:=MACD中軸+-MACD超跌線(xiàn);
海面:=頂部*0.191;
底部:=MACD底部;
{------------------------傳統KDJ指標結合MACD優(yōu)化---------------------------}
RSVA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*頂部;{采用21日月線(xiàn)優(yōu)化}
K:SMA(RSVA,3,1),COLORFFFFFF,NODRAW;
D:SMA(K,3,1),COLOR00FFFF,NODRAW;
原J值參數:=3*K-2*D;
JD:=IF(原J值參數《底部,底部,原J值參數);{J值底部鈍化處理}
J:IF(JD》頂部,頂部,JD),COLORFF00FF,NODRAW;{底部鈍化處理后再進(jìn)行頂部鈍化處理}
{---------------------------MACD多空量能判斷-------------------------------}
MACD多頭:DIFF修正+-MACD超跌線(xiàn),COLOR339999;
空頭:DEA修正+-MACD超跌線(xiàn),COLOR00FF00;
量能柱:2*(MACD多頭-空頭)+中軸,COLOR0000BB,NODRAW;
超前DEA:=(EMA(MACD多頭,7));
超前MACD:=2*(MACD多頭-超前DEA)+中軸;
{-----------------------------------大盤(pán)動(dòng)向-------------------------------}
VAR1大盤(pán):=LLV(LOW,13);
VAR2大盤(pán):=HHV(HIGH,13);
VAR3大盤(pán):=(SMA((CLOSE-VAR1大盤(pán))/(VAR2大盤(pán)-VAR1大盤(pán))*頂部,5,1))-頂部/2;
VAR4大盤(pán):=SMA((VAR2大盤(pán)-CLOSE)/(VAR2大盤(pán)-VAR1大盤(pán))*頂部,5,1)-頂部/2;
大盤(pán)散戶(hù):=IF(VAR4大盤(pán)《底部,底部,VAR4大盤(pán)),COLOR408000;
大盤(pán)主力:=IF(VAR3大盤(pán)《底部,底部,VAR3大盤(pán)),COLOR330088;
{---------------------------------密集成本突破-----------------------------}
最高獲利參數:=頂部/100;
VAR1C:=(COST(89)-COST(11))*最高獲利參數;
VAR2C:=(COST(99.9)-COST(1))*最高獲利參數;
單峰:=((1-VAR1C/VAR2C))*頂部;
低密:=((COST(90)-COST(60))/VAR2C)*頂部;
高密:=((COST(40)-COST(1))/VAR2C)*頂部;
贏(yíng)利:=
。⊿MA(WINNER(AMOUNT/VOL/99),2,1))*頂部;
活躍度:頂部-頂部/(1+EXPMA(HSL,21)),COLOR774455;{←CYF公眾追漲熱情指標}
。罚%成本集中度:=IF(VAR1C》南方財富網(wǎng)整理www.travelwithnise.com頂部,頂部,VAR1C),COLORFFFFFF;
。梗%成本集中度:=IF(VAR2C》頂部,頂部,VAR2C),COLORFF0000;
套牢籌碼上升:=IF((單峰-贏(yíng)利)》底部,(單峰-贏(yíng)利),底部);
個(gè)股散戶(hù):=IF(套牢籌碼上升》頂部,頂部,套牢籌碼上升),COLOR408000;
散戶(hù):IF(個(gè)股散戶(hù)=DRAWNULL,DRAWNULL,個(gè)股散戶(hù)),COLOR408000;
獲利籌碼上升:=IF((贏(yíng)利-單峰)》底部,(贏(yíng)利-單峰),底部);
個(gè)股主力:=IF(獲利籌碼上升》頂部,頂部,獲利籌碼上升),COLOR330088;
主力:IF(個(gè)股主力=DRAWNULL,DRAWNULL,個(gè)股主力),COLOR330088;
{--------------------換手率,五日換手率輔助判斷個(gè)股活躍度-------------------}
換手:SUM(VOL,1)/CAPITAL*100,COLOR666666,NODRAW;
、萑論Q:SUM(VOL,5)/CAPITAL*100,COLOR999999,NODRAW;
{----------------------密集成本突破指標籌碼峰畫(huà)線(xiàn)--------------------------}
金色背景修邊1:STICKLINE(C》0
AND CURRBARSCOUNT》=2,頂部,底部,3.05,0),COLOR003333;
金色背景修邊2:STICKLINE(C》0
AND
CURRBARSCOUNT》=2,頂部,中軸,3.05,0),COLOR003333;
金色背景補充:DRAWBAND(頂部,RGB(51,51,0),中軸,RGB(51,51,0));
金色背景:DRAWBAND(頂部,RGB(51,51,0),底部,RGB(128,128,128));
追漲熱度峰紫色:DRAWBAND(活躍度,RGB(66,52,81),底部,RGB(204,0,0));
高密峰墨藍色:=DRAWBAND(高密,RGB(0,0,51),底部,RGB(0,0,255));
低密峰純藍色:=DRAWBAND(低密,RGB(0,0,102),底部,RGB(0,0,255));
。梗%成本峰:DRAWBAND(90%成本集中度,RGB(0,0,153),底部,RGB(0,0,153));
。罚%成本峰:DRAWBAND(70%成本集中度,RGB(0,128,0),底部,RGB(255,255,255));
散戶(hù)峰綠色:DRAWBAND(散戶(hù),RGB(0,64,0),底部,RGB(204,0,0));
主力峰紅色:DRAWBAND(主力,RGB(102,26,51),底部,RGB(0,0,255));
MACD多空趨勢:DRAWBAND(MACD多頭,RGB(204,51,51),空頭,RGB(0,179,0));
MACD多頭重畫(huà):DRAWBAND(MACD多頭,RGB(153,153,51),MACD多頭,RGB(153,153,51));
MACD空頭重畫(huà):DRAWBAND(空頭,RGB(0,204,0),空頭,RGB(0,204,0));
{----此處刪去了你的廣告}
VAR1:=CLOSE》REF(CLOSE,1)
AND CLOSE》REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VARD:=CLOSE《REF(CLOSE,1) AND
CLOSE《REF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE《=REF(CLOSE,1) AND
CLOSE》=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE》=REF(CLOSE,1) AND
CLOSE《=REF(CLOSE,2);
三平底翻金:=(REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR
VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1))
AND
VAR1;
主力啟動(dòng)線(xiàn):=MA(V,5),COLORFFFFFF;
主力洗盤(pán)線(xiàn):=MA(V,35),COLOR00FFFF;
資金異動(dòng)線(xiàn):=MA(V,135),COLORFF0000;
{----------------------------買(mǎi)賣(mài)參考--------------------------------------}
出擊:=(CROSS(主力啟動(dòng)線(xiàn),資金異動(dòng)線(xiàn))
OR ((主力洗盤(pán)線(xiàn) 》 資金異動(dòng)線(xiàn)) AND
CROSS(主力啟動(dòng)線(xiàn),主力洗盤(pán)線(xiàn)))),COLORYELLOW;
啟動(dòng):=(主力啟動(dòng)線(xiàn)》REF(主力啟動(dòng)線(xiàn),1) AND
。–ROSS(VOL,主力啟動(dòng)線(xiàn))南方財富網(wǎng)整理www.travelwithnise.com AND (REF(VOL,1)《REF(資金異動(dòng)線(xiàn),1) OR
REF(VOL,2)《REF(資金異動(dòng)線(xiàn),2)))),COLOR45AAEE;
成立:=三平底翻金 AND (出擊 OR
啟動(dòng));
買(mǎi)入提示:=IF(成立=1,海面*0.5,0) AND
分時(shí)判斷=1;
{------------------------頂部線(xiàn),天際線(xiàn),海面線(xiàn),底部線(xiàn)重畫(huà)-------------------}
頂部線(xiàn):DRAWBAND(頂部,RGB(51,0,255),頂部,RGB(51,0,255));
天際線(xiàn):DRAWBAND(天際,RGB(128,64,64),天際,RGB(128,64,64));
海面線(xiàn):DRAWBAND(海面,RGB(0,153,153),海面,RGB(0,153,153));
底部線(xiàn):DRAWBAND(0,RGB(153,153,102),買(mǎi)入提示,RGB(153,153,102));
{------------------------超前MACD多空量能柱--------------------------------}
超前MACD紅柱1:STICKLINE(超前MACD》=中軸,超前MACD,中軸,1.50,0),COLOR226688;
超前MACD紅柱2:STICKLINE(超前MACD》=中軸,超前MACD,中軸,0.95,0),COLOR4488BB;
超前MACD紅柱3:STICKLINE(超前MACD》=中軸,超前MACD,中軸,0.31,0),COLOR55AADD;
超前MACD蘭柱1:STICKLINE(超前MACD《=中軸,超前MACD,中軸,1.50,0),COLOR006600;
超前MACD蘭柱2:STICKLINE(超前MACD《=中軸,超前MACD,中軸,0.95,0),COLOR007700;
超前MACD蘭柱3:STICKLINE(超前MACD《=中軸,超前MACD,中軸,0.31,0),COLOR008800;
{--------------------------MACD多空量能柱----------------------------------}
MACD紅柱1:STICKLINE(量能柱》=中軸,量能柱,中軸,1.5,0),COLOR000077;
MACD紅柱2:STICKLINE(量能柱》=中軸,量能柱,中軸,1.1,0),COLOR000088;
MACD紅柱3:STICKLINE(量能柱》=中軸,量能柱,中軸,0.6,0),COLOR000099;
MACD紅柱4:STICKLINE(量能柱》=中軸,量能柱,中軸,0.15,0),COLOR0000AA;
MACD蘭柱1:STICKLINE(量能柱《=中軸,量能柱,中軸,1.5,0),COLORAA6633;
MACD蘭柱2:STICKLINE(量能柱《=中軸,量能柱,中軸,1.1,0),COLORBB7744;
MACD蘭柱3:STICKLINE(量能柱《=中軸,量能柱,中軸,0.6,0),COLORCC8855;
MACD蘭柱4:STICKLINE(量能柱《=中軸,量能柱,中軸,0.15,0),COLORDD9966;
{---------中軸線(xiàn)重畫(huà)及頂部線(xiàn),天際線(xiàn),海面線(xiàn),底部線(xiàn),多空線(xiàn)文字說(shuō)明-----------}
中軸線(xiàn):DRAWBAND(中軸,RGB(128,128,255),中軸,RGB(128,128,255));
頂部線(xiàn)文字:DRAWTEXT(CURRBARSCOUNT=1,頂部*0.98,‘
頂部線(xiàn)’),COLORFF0033;
天際線(xiàn)文字:DRAWTEXT(CURRBARSCOUNT=1,天際*0.98,‘
天際線(xiàn)’),COLOR404080;
海面線(xiàn)文字:DRAWTEXT(CURRBARSCOUNT=1,海面,‘
海面線(xiàn)’),COLOR999900;
底部線(xiàn)文字:DRAWTEXT(CURRBARSCOUNT=1,底部,‘
底部線(xiàn)’),COLOR669999;
中軸線(xiàn)文字:DRAWTEXT(CURRBARSCOUNT=1,中軸,‘
多空線(xiàn)’),COLORFF8080;
{-------------------------------傳統KDJ指標線(xiàn)重畫(huà)--------------------------}
D線(xiàn)重畫(huà):DRAWBAND(D,RGB(255,255,0),D*0.998,RGB(255,255,0));
K線(xiàn)重畫(huà):DRAWBAND(K,RGB(255,255,255),K,RGB(255,255,255));
J線(xiàn)重畫(huà):DRAWBAND(J,RGB(255,0,255),J,RGB(255,0,255));
(南方財富網(wǎng)SOUTHMONEY.COM)