祖师爷精版(通达信公式 主图 源码 测试图)

[复制链接]
查看48 | 回复0 | 2022-6-27 16:11:52 | 显示全部楼层 |阅读模式
{公式名称: 祖师爷精版
公式描述: 
无参数
公式类型: 技术指标公式-其他类型
画线方法: 主图叠加
公式版本: 0
显示小数: 缺省位数
坐标线位置: 自动
额外Y轴分界: 无
 
参数精灵:无
用法注释:无
公式源码:}
兑:MA(CLOSE,1),COLOR0000FF,LINETHICK2,NODRAW;
震:MA(CLOSE,5),COLOR0080FF,LINETHICK2;
巽:MA(CLOSE,10),COLOR00FFFF,LINETHICK2;
乾:MA(CLOSE,22),COLOR00FF00,LINETHICK2;
坤:MA(CLOSE,66),COLORFF0000,LINETHICK2;
 
持股:=兑>巽,LINETHICK2,NODRAW;
STICKLINE(持股,H,L,0,0)COLOR0000FF;
STICKLINE(持股,O,C,2,0)COLOR0000FF;
警惕:=兑<震,NODRAW;
STICKLINE(警惕,H,L,0,0)COLORFF0000;
STICKLINE(警惕,O,C,2,0)COLORFF0000;
持币:=兑<巽,NODRAW;
STICKLINE(持币,H,L,0,0)COLORFFFF00;
STICKLINE(持币,O,C,2,0)COLORFFFF00;
 
M1:=CROSS(C,巽);
STICKLINE(M1,OPEN,CLOSE,1.5,0),COLOR00FFFF;
STICKLINE(M1,H,L,0,0)COLOR00FFFF;
DRAWTEXT(M1,L*1,'买入')COLORFF00FF,NODRAW;
 
Y:=((HIGH + LOW) / 2);
BLUE:=SMA(Y,13,1);
RED:=SMA(Y,8,1);
GREEN:=SMA(Y,5,1);
B2:=REF(BLUE,8);
R2:=REF(RED,5);
G2:=REF(GREEN,3);
KU1:=IF((HIGH = HHV(HIGH,3)),1,0);
KD1:=IF((LOW = LLV(LOW,3)),1,0);
UL:=IF((((REF(KU1,2) = 1) AND (REF(KU1,1) = 0)) AND (KU1 = 0)),REF(HIGH,2),REF(HIGH,(2 + BARSLAST((((REF(KU1,2) = 1) AND (REF(KU1,1) = 0)) AND (KU1 = 0))))));
DL:=IF((((REF(KD1,2) = 1) AND (REF(KD1,1) = 0)) AND (KD1 = 0)),REF(LOW,2),REF(LOW,(2 + BARSLAST((((REF(KD1,2) = 1) AND (REF(KD1,1) = 0)) AND (KD1 = 0))))));
KU:=IF((((CLOSE > B2) AND (CLOSE > R2)) AND (CLOSE > G2)),1,0);
KD:=IF((((CLOSE < B2) AND (CLOSE < R2)) AND (CLOSE < G2)),(0 - 1),0);
KK:=IF((BARSLAST(((KU = 1) AND (REF(KU,1) = 0))) < BARSLAST(((KD = (0 - 1)) AND (REF(KD,1) = 0)))),1,(0 - 1));
AO:=(MA(Y,5) - MA(Y,34));
AC:=MA((AO - MA(AO,5)),5);
AC1:=REF(AC,1);
AO1:=REF(AO,1);
KAC:=IF(((AC > AC1) AND (AO > AO1)),1,0);
KAO:=IF(((AC < AC1) AND (AO < AO1)),(0 - 1),0);
A1:SMA(REF(Y,8),13,1),COLORFFFFFF,LINETHICK2,NODRAW;
A2:SMA(REF(Y,5),8,1),COLORFFFFFF,LINETHICK2,NODRAW;
A3:SMA(REF(Y,3),5,1),COLORFFFFFF,LINETHICK2,NODRAW;
A4:IF((HIGH >= R2),UL,REF(UL,BARSLAST((HIGH > R2)))),POINTDOT,COLORFFFFFF,LINETHICK2,NODRAW;
A5:IF((LOW <= R2),DL,REF(DL,BARSLAST((LOW <= R2)))),POINTDOT,COLORFFFFFF,LINETHICK2,NODRAW;
STICKLINE((BARSLAST(ABS((A4 - REF(A4,1)))) < BARSLAST(((CLOSE > A4) AND (REF(CLOSE,1) < REF(A4,1))))),A4,A4,3,1),COLORFFFFFF NODRAW;
STICKLINE((BARSLAST(ABS((A5 - REF(A5,1)))) < BARSLAST(((CLOSE < A5) AND (REF(CLOSE,1) > REF(A5,1))))),A5,A5,3,1),COLORFFFFFF NODRAW; 
H1:=REF(HIGH,4);
H2:=REF(HIGH,3);
H3:=REF(HIGH,2);
H4:=REF(HIGH,1);
H5:=HIGH;
L1:=REF(LOW,4);
L2:=REF(LOW,3);
L3:=REF(LOW,2);
L4:=REF(LOW,1);
L5:=LOW;
‖:=((((H3 > H2) AND (H3 > H1)) AND (H3 > H4)) AND (H3 > H5));
‖FRACTAL:=IF(‖,1,0);
‖VAR1:=BACKSET(‖FRACTAL,3);
‖VAR2:=FILTER(‖VAR1,2);
‖VAR3:=BACKSET(‖FRACTAL,5);
∣:=((((L3 < L2) AND (L3 < L1)) AND (L3 < L4)) AND (L3 < L5));
∣FRACTAL:=IF(∣,1,0);
∣VAR1:=BACKSET(∣FRACTAL,3);
∣VAR2:=FILTER(∣VAR1,2);
∣VAR3:=BACKSET(∣FRACTAL,5); 
DRAWTEXT(‖VAR2,(HIGH +0.01),'●'),COLORFFFFFF NODRAW;
DRAWTEXT(∣VAR2,LOW-0.01,'●'),COLORFFFFFF NODRAW;
DRAWTEXT(((CLOSE > A4) AND (REF(CLOSE,1) < REF(A4,1))),(HIGH +0.15),'↑'),COLOR0000FF,NODRAW;
DRAWTEXT(((CLOSE < A5) AND (REF(CLOSE,1) > REF(A5,1))),(LOW * 0.99),'↓'),COLOR008000,NODRAW;
DRAWTEXT((((KU = 1) AND (REF(KU,1) = 0)) AND (CLOSE < 0)),LOW* 0.99,'↑'),COLOR0000FF,NODRAW;
DRAWTEXT((((KD = (0 - 1)) AND (REF(KD,1) = 0)) AND (CLOSE < 0)),(HIGH * 1.01),'↓'),COLORFFFF00,NODRAW;
 
DRAWTEXT((((KD = 0) AND (REF(KD,1) = (0 - 1))) AND (CLOSE < 0)),LOW,'△'),COLORRED,NODRAW;
M2:=CROSS(C,A4);
STICKLINE(M2,OPEN,CLOSE,1.5,0),COLORFFFFFF;
STICKLINE(M2,H,L,0,0),COLORFFFFFF ;
DRAWTEXT(M2,L*1,'突破买入'),COLOR0080FF NODRAW;
{常规提示}
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,DYBLOCK)COLORFFFFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.05,0,GNBLOCK)COLORFFFFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.10,0,FGBLOCK)COLORFFFFFF;

20211215754232917.rar

4.94 KB, 下载次数: 0

售价: 3 金钱  [记录]  [购买]

20211215754232917.rar

回复

使用道具 举报

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

本版积分规则