9qihuo.com
我们只提供有用的干货

筹码集中度改写 (文华财经WH6赢顺V6.7)

投资者咨询:筹码集中度改写 (文华财经WH6赢顺V6.7)
来源:文华财经  日期:2019/8/24 20:08

改个指标 老师 辛苦了。

P1:=90;
 DRAWTEXT_FIX(1,0.80,0,0,'【黄线RSI--判中期顶底,用来判断个股的位置】'),COLORWHITE;
 DRAWTEXT_FIX(1,0.80,0.1,0,'【粉线J值--判短期顶底】'),COLORWHITE;
 DRAWTEXT_FIX(1,0.40,0.00,0,Ƈ.RSI1下穿20后再次上穿20,底部确认,反弹开始;2.如再上穿50,启动走强确认;'),COLOR3333FF;
 DRAWTEXT_FIX(1,0.40,0.10,0,'红柱与2点共振,底部确认;该2N1指标适用于震荡行情;急涨急跌的单边市RSI放大到周线看,J值不看;'),COLOR3333FF;
 DRAWBAND(100,RGB(0,78,78),80,RGB(0,0,0));{底色带}
 DRAWBAND(80,RGB(0,118,118),50,RGB(0,0,0));{底色带}
 DRAWBAND(20,RGB(0,38,38),0,RGB(0,0,0));{底色带}
 {二点出击}
 VAR2:=REF(LOW,1);
 VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
 VAR4:=EMA(VAR3*10,3);
 VAR5:=LLV(LOW,13);
 VAR6:=HHV(VAR4,13);
 VAR7:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618;
 VAR8:=IF(VAR7>50,50,VAR7);
 RSVDS:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
 AS:=SMA(RSVDS,3,1);
 AC:=SMA(AS,3,1);
 AF:=3*AS-2*AC;
 AW:=LLV(AF,2)=LLV(AF,8);
 AH:=IF(CROSS(AF,REF(AF+0.01,1)) AND AW AND AF<20,30,0);
 SJ:=WMA(((2*C+H+L)/4-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
 ZJ:=WMA(0.618*REF(SJ,1)+0.382*SJ,2);
 VAR3A:=3;
 VAR2A:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
 MTM:=C-REF(C,1);
 DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
 YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
 STICKLINE(VAR8>-120,0,VAR8,3,1),COLORGRAY;
 STICKLINE(VAR8>1 AND "KDJ.J">REF("KDJ.J",1) AND REF("KDJ.J",1)<REF("KDJ.J",2),0,VAR8,3,0),COLORRED;
 超买区:80,COLORFFFF00,LINETHICK4;
 风险区:90,COLORFF0000,LINETHICK2;
 超卖区:20,COLOR208FFF,LINETHICK4;
 0,COLORWHITE,LINETHICK4;
 中轴强弱分界:50,LINETHICK4,COLORLIRED;
 100,COLORWHITE,LINETHICK4;
 {J值}
 N1:=9;
 M1:=3;
 M2:=3;
 RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
 K:=SMA(RSV,M1,1);
 D:=SMA(K,M2,1);
 J:3*K-2*D,COLORMAGENTA;
 DRAWNUMBER(ISLASTBAR,J,J),COLORMAGENTA;{标注J位置};
 DRAWICON(CROSS(J,超卖区),超卖区,30);{上穿显示};
 {RSI1强弱线}
 LC1:=REF(CLOSE,1);
 RSI1强弱线:SMA(MAX(CLOSE-LC1,0),6,1)/SMA(ABS(CLOSE-LC1),6,1)*100,COLORYELLOW;
 DRAWNUMBER(ISLASTBAR,RSI1强弱线,RSI1强弱线),COLORYELLOW;{标注RSI1位置};
 {RSI与J值底部共振}
 底部共振:RSI1强弱线<20 AND J<0 ,NODRAW,COLOR00C9FF;
 STICKLINE(底部共振,-10,10,3,0),COLOR0055AA;
 STICKLINE(底部共振,-10,10,2.8,0),COLOR0066BB;
 STICKLINE(底部共振,-10,10,2.5,0),COLOR0077CC;
 STICKLINE(底部共振,-10,10,2.2,0),COLOR0088DD;
 STICKLINE(底部共振,-10,10,1.7,0),COLOR0099EE;
 STICKLINE(底部共振,-10,10,1.2,0),COLOR00AAFF;
 STICKLINE(底部共振,-10,10,0.7,0),COLOR00CCFF;
 STICKLINE(底部共振,-10,10,0.2,0),COLOR00FFFF;
 DRAWTEXT(底部共振,12,'�L底部共振'),COLOR00C9FF;
 IF(RSI1强弱线>REF(超卖区,1),RSI1强弱线,DRAWNULL)LINETHICK2,COLORYELLOW;
 IF(RSI1强弱线<REF(超卖区,1),RSI1强弱线,DRAWNULL)LINETHICK4,COLORBLUE;{RSI1}
 IF(J>REF(0,1),J,DRAWNULL)LINETHICK2,COLORMAGENTA;
 IF(J<REF(0,1),J,DRAWNULL)LINETHICK4,COLORGREEN;{J}
 DRAWICON(CROSS(RSI1强弱线,中轴强弱分界),中轴强弱分界,1);{上穿显示};
 {RSI底背离和顶背离}
 A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
 B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS
 ("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
 C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
 D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS
 ("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
 DRAWICON((D3>0),99,2);
 DRAWTEXT((D3>0),97,' RSI顶背'),COLORCYAN;
 DRAWICON((B3>0),21,1);
 DRAWTEXT((B3>0),23,' RSI底背'),COLORRED;
 {顶底符号}
 DRAWTEXT(ISLASTBAR,90,ྌ-100超买区'),COLORFFFF00;
 DRAWTEXT(ISLASTBAR,超卖区,'超卖线'),COLOR208FFF;
 DRAWTEXT(ISLASTBAR,65,཮-80强势区'),COLORLIRED;
 DRAWTEXT(ISLASTBAR,50,'强弱分界'),COLORLIRED;
 DRAWTEXT(ISLASTBAR,35,ཐ-50弱势区'),COLORLIGRAY;
 DRAWTEXT(ISLASTBAR,10,ཐ-0超卖区'),COLORLIGREEN;
 DRAWTEXT(ISLASTBAR,0,' 0轴'),COLORWHITE;
 {筹码集中度}
 获利比例:WINNER(CLOSE)*100,NODRAW;
 AA:=P1+(100-P1)/2;
 B:=(100-P1)/2;
 CC:=COST(AA);
 DD:=COST(B);
 筹码集中度:(CC-DD)/(CC+DD)*100,NODRAW;
 STICKLINE(获利比例>=80 AND 筹码集中度<=10,0,15,1,0),COLORYELLOW;
 STICKLINE(获利比例>=80 AND 筹码集中度<=10,15,30,1,0),COLORGREEN;
 STICKLINE(获利比例>=90 AND 筹码集中度<=10,20,40,1,0),COLORRED;
 STICKLINE(获利比例>=90 AND 筹码集中度<=10,0,20,1,0),COLORYELLOW;

 
技术人员回复
日期:2019/8/25 9:01
 不同软件函数机制不同,加载起来有差异是正常的,参考:


P1:=10;

FILLRGN(1,20,0,RGB(0,38,38));
FILLRGN(1,80,100,RGB(0,78,78));
FILLRGN(1,80,50,RGB(0,118,118));
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(VAR3*10,3);
VAR5:=LLV(LOW,13);
VAR6:=HHV(VAR4,13);
LC := REF(CLOSE,1);//前一周期收盘价
{J值}N1:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:3*K-2*D,COLORMAGENTA;
RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;//当根K线收盘价与前一周期收盘价做差,在该差值与0之间取最大值,做N1周期移动平均。收盘价与前一周期收盘价做差值,取该差值的N1周期移动平均值,两平均值之间做比值。
RSI2:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;
VAR7:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618;
VAR8:=IF(VAR7>50,50,VAR7);
RSVDS:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
AS:=SMA(RSVDS,3,1);
AC:=SMA(AS,3,1);
AF:=3*AS-2*AC;
AW:=LLV(AF,2)=LLV(AF,8);
AH:=IF(CROSS(AF,REF(AF+0.01,1)) AND AW AND AF<20,30,0);
SJ:=EMA2(((2*C+H+L)/4-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2); 
ZJ:=EMA2(0.618*REF(SJ,1)+0.382*SJ,2);
VAR3A:=3;
VAR2A:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
STICKLINE1(VAR8>-120,0,VAR8,3,1),COLORGRAY;
STICKLINE1(VAR8>1 AND J>REF(J,1) AND REF(J,1)<REF(J,2),0,VAR8,3,0),COLORRED;
超买区:80,COLORFFFF00,LINETHICK4;
风险区:90,COLORFF0000,LINETHICK2;
超卖区:20,COLOR208FFF,LINETHICK4;
0,COLORWHITE,LINETHICK4;
中轴强弱分界:50,LINETHICK4,COLORRED;
100,COLORWHITE,LINETHICK4;

DRAWNUMBER1(ISLASTBAR,J,J,2),COLORMAGENTA;

DRAWICON(CROSS(J,超卖区),超卖区,30);

{RSI1强弱线}LC1:=REF(CLOSE,1);
RSI1强弱线:SMA(MAX(CLOSE-LC1,0),6,1)/SMA(ABS(CLOSE-LC1),6,1)*100,COLORYELLOW;
DRAWNUMBER1(ISLASTBAR,RSI1强弱线,RSI1强弱线,2),COLORYELLOW;

{RSI与J值底部共振}底部共振:RSI1强弱线<20 AND J<0 ,NODRAW,COLOR00C9FF;
STICKLINE1(底部共振,-10,10,3,0),COLOR0055AA;
STICKLINE1(底部共振,-10,10,2.8,0),COLOR0066BB;
STICKLINE1(底部共振,-10,10,2.5,0),COLOR0077CC;
STICKLINE1(底部共振,-10,10,2.2,0),COLOR0088DD;
STICKLINE1(底部共振,-10,10,1.7,0),COLOR0099EE;
STICKLINE1(底部共振,-10,10,1.2,0),COLOR00AAFF;
STICKLINE1(底部共振,-10,10,0.7,0),COLOR00CCFF;
STICKLINE1(底部共振,-10,10,0.2,0),COLOR00FFFF;
DRAWTEXT(底部共振,12,'底部共振'),COLOR00C9FF;
IF(RSI1强弱线>REF(超卖区,1),RSI1强弱线,NULL),LINETHICK2,COLORYELLOW;
IF(RSI1强弱线<REF(超卖区,1),RSI1强弱线,NULL),LINETHICK4,COLORBLUE;
IF(J>REF(0,1),J,NULL),LINETHICK2,COLORMAGENTA;
IF(J<REF(0,1),J,NULL),LINETHICK4,COLORGREEN;
DRAWICON(CROSS(RSI1强弱线,中轴强弱分界),中轴强弱分界,1);

A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
DRAWICON((D3>0),99,2);
DRAWTEXT((D3>0),97,'NBSP');  
//RSI顶背,COLORCYAN;
DRAWICON((B3>0),21,1);
DRAWTEXT((B3>0),23,'NBSP');  
//RSI底背,COLORRED;
DRAWTEXT(ISLASTBAR,90,'?100超买区'),COLORFFFF00;
DRAWTEXT(ISLASTBAR,超卖区,'卖线'),COLOR208FFF;
DRAWTEXT(ISLASTBAR,65,'?80强势区'),COLORRED;
DRAWTEXT(ISLASTBAR,50,'弱分界'),COLORRED;
DRAWTEXT(ISLASTBAR,35,'?50弱势区'),COLORGRAY;
DRAWTEXT(ISLASTBAR,10,'?0超卖区'),COLORGREEN;
DRAWTEXT(ISLASTBAR,0,'NBSP');  
0,COLORWHITE;
获利比例:WINNER(CLOSE)*100,NODRAW;
AA:=P1+(100-P1)/2;
B:=(100-P1)/2;
CC:=COST(AA);
DD:=COST(B);
筹码集中度:(CC-DD)/(CC+DD)*100,NODRAW;
STICKLINE1(获利比例>=80 AND 筹码集中度<=10,0,15,1,0),COLORYELLOW;
STICKLINE1(获利比例>=80 AND 筹码集中度<=10,15,30,1,0),COLORGREEN;
STICKLINE1(获利比例>=90 AND 筹码集中度<=10,20,40,1,0),COLORRED;
STICKLINE1(获利比例>=90 AND 筹码集中度<=10,0,20,1,0),COLORYELLOW;
投资者咨询:筹码集中度改写 (文华财经WH6赢顺V6.7)
来源:文华财经  日期:2019/8/24 20:08
 谢谢欧阳老师