找回密码
 立即注册

QQ登录

只需一步,快速开始

广告载入中...
查看: 7656|回复: 288

分享一个九转指标的主图公式。

 火.. [复制链接]
发表于 2018-5-25 12:50 | 显示全部楼层 |阅读模式

马上注册,享用更多功能,让你轻松玩转本论坛。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 wen98 于 2018-6-6 23:55 编辑

下面是九转指标主图公式(源码),需要的拿,参考图形如下:

GT4 := C>REF(C,4);
GNT := BARSLASTCOUNT(GT4), NODRAW;
GTJ1 := (GNT=9);
GTJ2 := ISLASTBAR AND BETWEEN(GNT,6,8);
GBM := (BACKSET(GTJ1,9) OR BACKSET(GTJ2,GNT))*GNT;
DRAWNUMBER(GBM>0 AND GBM<9, H, GBM), COLORMAGENTA;
DRAWNUMBER(GNT=9, H, 9), COLORGREEN;

LT4 := C<REF(C,4);
LNT := BARSLASTCOUNT(LT4), NODRAW;
LTJ1 := (LNT=9);
LTJ2 := ISLASTBAR AND BETWEEN(LNT,6,8);
LBM := (BACKSET(LTJ1,9)  OR  BACKSET(LTJ2,LNT))*LNT;
DRAWNUMBER(LBM>0 AND LBM<9, L, LBM), COLORGREEN;
DRAWNUMBER(LNT=9, L, 9), COLORMAGENTA



评分

1

查看全部评分

发表于 2019-3-23 14:54 | 显示全部楼层

月K:"KDJ.K"(89,3,3),COLOR00FF00;
月D:"KDJ.D"(89,3,3),COLOR00FF00,LINETHICK2;
周K:"KDJ.K"(27,3,3),COLORRED;
周D:"KDJ.D"(27,3,3),COLORRED,LINETHICK2;
日K:"KD.K"(5,3,3),COLORWHITE;
日D:"KD.D"(5,3,3),COLORWHITE,LINETHICK2;
日金叉:IF(CROSS(日K,日D),50,0),COLORFFFFFF;
DRAWTEXT(日金叉,50,'日叉'),COLORFFFFFF;
周金叉:IF(CROSS(周K,周D),30,0),COLORRED;
DRAWTEXT(周金叉,30,'周叉'),COLORRED;
月金叉:IF(CROSS(月K,月D),20,0),COLOR0080FF;
DRAWTEXT(月金叉,20,'月叉'),COLORYELLOW;
{KD在30以下多次金叉}
JM:=CROSS("KDJ.K"(5,3,3),"KDJ.D"(5,3,3));
JMCOUNT:=COUNT(JM,BARSLAST("KDJ.D"(5,3,3)>=30));
JMTJ:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=1,21)=1);
DRAWTEXT (JMTJ,70,'①'),COLORWHITE;
JMTJ2:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=2,21)=1);
DRAWTEXT (JMTJ2,70,'②'),COLORYELLOW;
JMTJ3:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=3,21)=1);
DRAWTEXT (JMTJ3,70,'③'),COLORYELLOW;
JMTJ4:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=4,21)=1);
DRAWTEXT (JMTJ4,70,'④'),COLORYELLOW;
JMTJ5:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=5,21)=1);
DRAWTEXT (JMTJ5,70,'⑤'),COLORYELLOW;
0,COLORYELLOW;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
MACD底背离:STICKLINE(FILTER(B1>0,5),0,0.75,3,0),COLORGREEN;
DRAWTEXT(FILTER(B1>0,5),0.57,'MACD底背离'),COLORGREEN;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);
KDJ底背离:STICKLINE(FILTER(B2>0,5),0,1,3,0),COLORYELLOW;
DRAWTEXT(FILTER(B2>0,5),0.80,'KDJ底背离'),COLORYELLOW;
LC :=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
RSI底背离:STICKLINE(FILTER(B3>0,5),0,0.5,3,0),COLORWHITE;
DRAWTEXT(FILTER(B3>0,5),0.25,'RSI底背离'),COLORWHITE;
2,COLORRED;
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
MACD顶背离:STICKLINE(FILTER(D1>0,5),2,1.25,3,0),COLOR0066FF;
DRAWTEXT(FILTER(D1>0,5),1.47,'MACD顶背离'),COLOR0066FF;
C2:=BARSLAST(REF(CROSS(D,K),1));D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K);
KDJ顶背离:STICKLINE(FILTER(D2>0,5),2,1,3,0),COLORRED;
DRAWTEXT(FILTER(D2>0,5),1.2,'KDJ顶背离'),COLORRED;
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
RSI顶背离:STICKLINE(FILTER(D3>0,5),2,1.5,3,0),COLORFF00FF;
DRAWTEXT(FILTER(D3>0,5),1.75,'RSI顶背离'),COLORFF00FF;
回复

使用道具 举报

发表于 2019-1-6 10:38 | 显示全部楼层
月K:"KDJ.K"(89,3,3),COLOR00FF00;
月D:"KDJ.D"(89,3,3),COLOR00FF00,LINETHICK2;
周K:"KDJ.K"(27,3,3),COLORRED;
周D:"KDJ.D"(27,3,3),COLORRED,LINETHICK2;
日K:"KD.K"(5,3,3),COLORWHITE;
日D:"KD.D"(5,3,3),COLORWHITE,LINETHICK2;
日金叉:IF(CROSS(日K,日D),50,0),COLORFFFFFF;
DRAWTEXT(日金叉,50,'日叉'),COLORFFFFFF;
周金叉:IF(CROSS(周K,周D),30,0),COLORRED;
DRAWTEXT(周金叉,30,'周叉'),COLORRED;
月金叉:IF(CROSS(月K,月D),20,0),COLOR0080FF;
DRAWTEXT(月金叉,20,'月叉'),COLORYELLOW;
{KD在30以下多次金叉}
JM:=CROSS("KDJ.K"(5,3,3),"KDJ.D"(5,3,3));
JMCOUNT:=COUNT(JM,BARSLAST("KDJ.D"(5,3,3)>=30));
JMTJ:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=1,21)=1);
DRAWTEXT (JMTJ,70,'①'),COLORWHITE;
JMTJ2:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=2,21)=1);
DRAWTEXT (JMTJ2,70,'②'),COLORYELLOW;
JMTJ3:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=3,21)=1);
DRAWTEXT (JMTJ3,70,'③'),COLORYELLOW;
JMTJ4:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=4,21)=1);
DRAWTEXT (JMTJ4,70,'④'),COLORYELLOW;
JMTJ5:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=5,21)=1);
DRAWTEXT (JMTJ5,70,'⑤'),COLORYELLOW;
0,COLORYELLOW;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
MACD底背离:STICKLINE(FILTER(B1>0,5),0,0.75,3,0),COLORGREEN;
DRAWTEXT(FILTER(B1>0,5),0.57,'MACD底背离'),COLORGREEN;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);
KDJ底背离:STICKLINE(FILTER(B2>0,5),0,1,3,0),COLORYELLOW;
DRAWTEXT(FILTER(B2>0,5),0.80,'KDJ底背离'),COLORYELLOW;
LC :=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
RSI底背离:STICKLINE(FILTER(B3>0,5),0,0.5,3,0),COLORWHITE;
DRAWTEXT(FILTER(B3>0,5),0.25,'RSI底背离'),COLORWHITE;
2,COLORRED;
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
MACD顶背离:STICKLINE(FILTER(D1>0,5),2,1.25,3,0),COLOR0066FF;
DRAWTEXT(FILTER(D1>0,5),1.47,'MACD顶背离'),COLOR0066FF;
C2:=BARSLAST(REF(CROSS(D,K),1));D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K);
KDJ顶背离:STICKLINE(FILTER(D2>0,5),2,1,3,0),COLORRED;
DRAWTEXT(FILTER(D2>0,5),1.2,'KDJ顶背离'),COLORRED;
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
RSI顶背离:STICKLINE(FILTER(D3>0,5),2,1.5,3,0),COLORFF00FF;
DRAWTEXT(FILTER(D3>0,5),1.75,'RSI顶背离'),COLORFF00FF;

回复

使用道具 举报

发表于 2019-4-4 10:26 | 显示全部楼层
GT4 := C>REF(C,4);
GNT := BARSLASTCOUNT(GT4), NODRAW;
GTJ1 := (GNT=9);
GTJ2 := ISLASTBAR AND BETWEEN(GNT,6,8);
GBM := (BACKSET(GTJ1,9) OR BACKSET(GTJ2,GNT))*GNT;
DRAWNUMBER(GBM>0 AND GBM<9, H, GBM), COLORMAGENTA;
DRAWNUMBER(GNT=9, H, 9), COLORGREEN;

LT4 := C<REF(C,4);
LNT := BARSLASTCOUNT(LT4), NODRAW;
LTJ1 := (LNT=9);
LTJ2 := ISLASTBAR AND BETWEEN(LNT,6,8);
LBM := (BACKSET(LTJ1,9)  OR  BACKSET(LTJ2,LNT))*LNT;
DRAWNUMBER(LBM>0 AND LBM<9, L, LBM), COLORGREEN;
DRAWNUMBER(LNT=9, L, 9), COLORMAGENTA
回复

使用道具 举报

 楼主| 发表于 2018-5-25 12:52 | 显示全部楼层
要3学分,是因为现在学分实在太低了,权限太少,希望股友们帮帮忙。如果真是学分少又像要公式的,单独联系我。
回复

使用道具 举报

发表于 2018-5-25 13:38 | 显示全部楼层
楼主,好用不?
回复

使用道具 举报

发表于 2018-5-25 14:01 | 显示全部楼层
我比你学分儿还低。学分太低,真的是影响看贴。
回复

使用道具 举报

发表于 2018-5-25 14:13 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

发表于 2018-5-25 14:14 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

发表于 2018-5-25 14:15 | 显示全部楼层

要3学分,是因为现在学分实在太低了,权限太少,希望股友们帮帮忙。如果真是学分少又像要公式的,单独联系我。
回复

使用道具 举报

发表于 2018-5-25 14:17 | 显示全部楼层

要3学分,是因为现在学分实在太低了,权限太少,希望股友们帮帮忙。如果真是学分少又像要公式的,单独联系我。
回复

使用道具 举报

 楼主| 发表于 2018-5-25 14:40 | 显示全部楼层

指标绝对准确,用法靠自己。
回复

使用道具 举报

 楼主| 发表于 2018-5-25 14:44 | 显示全部楼层
大家付3学分,我还得缴1学分的税,唉...
回复

使用道具 举报

发表于 2018-5-25 15:00 | 显示全部楼层
谢谢分享!
回复

使用道具 举报

发表于 2018-5-25 15:15 | 显示全部楼层
谢谢分享,谢谢分享
回复

使用道具 举报

发表于 2018-5-25 15:19 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

发表于 2018-5-25 15:35 | 显示全部楼层
ssssssss,ehhEREH
回复

使用道具 举报

发表于 2018-5-25 16:07 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|股海明灯官网 ( 京ICP备18020431号 )

GMT+8, 2024-11-22 20:57 , Processed in 0.105234 second(s), Total 13, Slave 12 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表