网友求助:
指标skdj公式:
LOWV:=LLV(L,9);
HIGHV:=HHV(H,9);
RSV:=EMA((C-LOWV)/(HIGHV-LOWV)*100,3);
K:EMA(RSV,3);
D:MA(K,3);
指标macd公式:
DIFF:EMA(C,12)-EMA(C,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),COLORSTICK;
老师,新年快乐!请将skdj和macd指标公式叠加在一起,成为一个公式,
解答如下:
A:=EMA(CLOSE,26);
T:=EMA(CLOSE,12);
B:=EMA(A,9);
T1:=EMA(T,9);
DEA:EMA(T-(T1-T),2),COLORFF8866,LINETHICK2;
DIFF:DEA-EMA(((A-B)-(T-T1)),1)*6,COLORFFFF66,LINETHICK2;
FILLRGN(DEA,DIFF,DIFF>DEA),COLOR5C4176;
FILLRGN(DEA,DIFF,DIFF<DEA),COLORGRAY;
LOWV:=LLV(L,9);
HIGHV:=HHV(H,9);
RSV1:=EMA((C-LOWV)/(HIGHV-LOWV),3);
RSV2:=(RSV1-0.5)/5*EMA(C,20);
RSVK:=SMA(RSV2,3,1);
RSVD:=SMA(RSVK,3,1);
RSVJ:=RSVK*3-RSVD*2;
K:RSVK+EMA(C,20),COLORWHITE;
D:RSVD+EMA(C,20),COLORYELLOW;
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),OPEN,CLOSE,7,0),colorred;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),color00ff00;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),OPEN,CLOSE,7,0),color00ff00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.5,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLORFF00FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLORFF22FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLORFF44FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLORFF66FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLORFF88FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLORFF99FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLORFFAAFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0) ,COLORFFBBFF;