联系方式 Contact

云指标公式网

淘宝:zb-mart.taobao.com

电话:18020657357

微信:18020657357

Q Q:396950280

点击这里给我发消息

网址:www.yzhibiao.com

搜索 Search

★把KDJ的MACD做成主图更加方便与分析【J-MACD主图】

2016-3-18 13:25:06点击:
根据大家的要求我进一步把原来的幅图改成主图.再一次发给大家.源码不用币.但是你还是【不要拿了就走】.与人方便.还是回复一下.让更多的人知道.不更好吗.-------------
【A】大智慧的和通达信的.不是完全一样.这是因为各有特别的函数.不能取代. 也各有所长.
【B】用KDJ的J编辑MACD是有好处.但是你要是用在主图那就不一样了. 这个MACD的数据比原来的MACD大了十倍.百倍.所以和股价极其不协调.为此不得不加参数【PK】然而股价由一两块到几百块.指数则上千上万.所以为了明确看清楚【K线】就必须大幅度调整【PK】这个数据.大家看看我发的图.就明白了.
【C】我仔细研究一下参数【PK】每次换股都得调正太麻烦了---------------改用【PK:=50/C;】也可以的-----------通达信软件同样也可以的-----------------


大智慧的源码如下;-------------------------------------------------------------------

{J-MACD主图}
DRAWGBKlast(c>0,strip(R【】GB(0,0,60),RGB(0,0,0),0));
PK:=50/C; 
A7:=(2*C+H+L)/4;
操作:WMA(a7,5),COLOR0000ff,linethick3;
LLX:LLV(操作,2),COLORFF9900,linethick2; ;
PARTLINE(操作,操作=LLX,rgb(0,200,200),操作<>LLX,rgb(255,0,0)),linethick2;
Var1:LLV(a7,21),color00ffff,LINETHICK1;
Var2:HHV(a7,21),color0044ff,LINETHICK1;
{K线变色}
STICKLINE(CLOSE>=OPEN,OPEN,LOW,0.5,0 ),COLOR0000ff,LAYER0;
STICKLINE(CLOSE>=OPEN,CLOSE,HIGH,0.5,0 ),COLOR0000ff,LAYER0;
STICKLINE(CLOSE<OPEN,OPEN,LOW,0.5,0 ),COLOR00ff00,LAYER7;
STICKLINE(CLOSE<OPEN,CLOSE,HIGH,0.5,0 ),COLOR00ff00,LAYER7;

STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR002200;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR004400;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR006600;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00AA00;   
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00DD00;

STICKLINE(close>open,close,open,8,0) ,COLORFF00FF; 
STICKLINE(close>open,close,open,7,0) ,COLORFF22FF;
STICKLINE(close>open,close,open,6,0) ,COLORFF44FF;
STICKLINE(close>open,close,open,5,0) ,COLORFF66FF;
STICKLINE(close>open,close,open,4,0) ,COLORFF88FF; 
STICKLINE(close>open,close,open,3,0) ,COLORFF99FF;
STICKLINE(close>open,close,open,2,0) ,COLORFFAAFF;
STICKLINE(close>open,close,open,1,0) ,COLORFFBBFF;
STICKLINE(close>open,close,open,0,0) ,COLORFFBBFF;

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;
DIFF:(EMA(J,8) - EMA(J,16))/PK,COLOR00FF00,LAYER0;;
DEA:EMA(DIFF,5),COLORFF9900,LAYER0;;
MACD:2*(DIFF-DEA), COLORSTICK;
0,COLORff9900,DOTLINE;
FILLRGN(DIFF,DEA,DIFF>DEA,RGB(80,0,80),DIFF<DEA,RGB(0,120,60)),LAYER7;
DRAWTEXTABS(5,10,'■叠加KDJ的坐标参数与股票价格有关需要调整.在不重叠的条件下尽可能的放大K线:【 PK='+PK+'】'),COLOR00FFFF,LINETHICK3,LAYER0;
DRAWTEXTABS(5,30,'■现在KDJ的参数是:N=9,M1=3,M2=3;'),COLOR00FF00,LINETHICK3,LAYER0;
DRAWTEXTABS(5,50,'■【KDJ】的【MACD】的参数是:LONG=8,LONG=16,M=5;'),COLOR0049FF,LINETHICK3,LAYER0;

{高抛低吸
分析家公式网www.88gs.com}
MA5:=MA(CLOSE,5);
DIFFG:=(EMA(C,12) - EMA(C,26));
DEAG:=EMA(DIFFG,9);
MACDG:=2*(DIFFG-DEAG);
卖:=CROSS((MA5<REF(MA5,1) AND MACDG<REF(MACDG,1) AND J<REF(J,1)),(MA5>REF(MA5,1) AND MACDG>REF(MACDG,1) AND J>REF(J,1)));
DRAWTEXT(FILTER(卖,5),H*1.112,'★卖'),COLOR00FF00;
STICKLINE(FILTER(卖,5),H*1.15,H,0,0),COLOR05FF00;
买:=CROSS((MA5>REF(MA5,1) AND MACDG>REF(MACDG,1) AND J>REF(J,1)),(MA5<REF(MA5,1) AND MACDG<REF(MACDG,1) AND J<REF(J,1)));
DRAWTEXT(FILTER(买,5),L*0.83,'★买'),COLOR0000FF;
STICKLINE(FILTER(买,5),L*0.8,L,0,0),COLOR0555FF;
--------------------------------------------------------------------------------------------------------------------------------