通达信【金钻擒妖】主副图指标 采用了强势股加速的思路编制 源码
{金钻擒妖主图源码如下}
STICKLINE((C-REF(C,1))/REF(C,1)>=0.099,O,C,2,0),COLORYELLOW;
操盘线:MA(C,5)DOTLINE;
趋势线:MA(C,30)COLORMAGENTA ;
ABC1:=IF(NAMELIKE(1),1,0)=0;
ABC2:=IF(NAMELIKE(2),1,0)=0;
ABC3:=IF(NAMELIKE(3),1,0)=0;
ABC4:=IF(CODELIKE(4),1,0)=0;
ABC5:=IF(CODELIKE(5),1,0)=0;
ABC6:=IF(CODELIKE(6),1,0)=0;
ABC7:=ABC1 AND ABC2 AND ABC3 AND ABC5 AND ABC6;
ABC8:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
ABC9:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
ABC10:=SUM(ABC8,5);
ABC11:=SUM(ABC9,5);
ABC12:=IF(ABC10>ABC11,(ABC10-ABC11)/ABC10,IF(ABC10=ABC11,0,(ABC10-ABC11)/ABC11));
ABC13:=MA(ABC12,5);
ABC14:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
ABC15:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
ABC16:=SUM(ABC14,3);
ABC17:=SUM(ABC15,3);
ABC18:=IF(ABC16>ABC17,(ABC16-ABC17)/ABC16,IF(ABC16=ABC17,0,(ABC16-ABC17)/ABC17));
ABC19:=MA(ABC18,3);
ABC20:=HHV(CLOSE,2);
ABC21:=BARSLAST(ABC20< REF(ABC20,2));
ABC22:=IF(INBLOCK(1),0.2,IF(INBLOCK(2),0.2,IF(INBLOCK(3),0.05,0.1)));
ABC23:=CLOSE>=ZTPRICE(REF(CLOSE,1),ABC22) AND CLOSE=HIGH AND OPEN!=HIGH;
ABC24:=REF(BARSLASTCOUNT(ABC23),1);
ABC25:=(OPEN-REF(CLOSE,1))/REF(CLOSE,1)*100;
ABC26:=DYNAINFO(15)/OPEN/100;
ABC27:=IF(CAPITAL< 100000,100000,CAPITAL);
ABC28:=ABC26/REF(MA(VOL,5),1)*240;
ABC29:=ABC25*ABC26/ABC27*100;
ABC30:=DYNAINFO(15)/OPEN/FINANCE(46)*100;
DRAWTEXT(RANGE(ABC25,4,9) AND ABC24=1 AND ABC28>20 AND ABC29>4 AND ABC30>1.5 AND ABC7 AND CLOSE< 40,L*0.99,' ★金钻擒妖'),COLORFF00FF;
DRAWICON(RANGE(ABC25,4,9) AND ABC24=1 AND ABC28>20 AND ABC29>4 AND ABC30>1.5 AND ABC7 AND CLOSE< 40,L,25);
{金钻擒妖副图源码如下}
ABC1:=IF(NAMELIKE(1),1,0)=0;
ABC2:=IF(NAMELIKE(2),1,0)=0;
ABC3:=IF(NAMELIKE(3),1,0)=0;
ABC4:=IF(CODELIKE(4),1,0)=0;
ABC5:=IF(CODELIKE(5),1,0)=0;
ABC6:=IF(CODELIKE(6),1,0)=0;
ABC7:=ABC1 AND ABC2 AND ABC3 AND ABC5 AND ABC6;
ABC8:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
ABC9:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
ABC10:=SUM(ABC8,5);
ABC11:=SUM(ABC9,5);
ABC12:=IF(ABC10>ABC11,(ABC10-ABC11)/ABC10,IF(ABC10=ABC11,0,(ABC10-ABC11)/ABC11));
ABC13:=MA(ABC12,5);
ABC14:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
ABC15:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
ABC16:=SUM(ABC14,3);
ABC17:=SUM(ABC15,3);
ABC18:=IF(ABC16>ABC17,(ABC16-ABC17)/ABC16,IF(ABC16=ABC17,0,(ABC16-ABC17)/ABC17));
ABC19:=MA(ABC18,3);
ABC20:=HHV(CLOSE,2);
ABC21:=BARSLAST(ABC20< REF(ABC20,2));
ABC22:=IF(INBLOCK(1),0.2,IF(INBLOCK(2),0.2,IF(INBLOCK(3),0.05,0.1)));
ABC23:=CLOSE>=ZTPRICE(REF(CLOSE,1),ABC22) AND CLOSE=HIGH AND OPEN!=HIGH;
ABC24:=REF(BARSLASTCOUNT(ABC23),1);
ABC25:=(OPEN-REF(CLOSE,1))/REF(CLOSE,1)*100;
ABC26:=DYNAINFO(15)/OPEN/100;
ABC27:=IF(CAPITAL< 100000,100000,CAPITAL);
ABC28:=ABC26/REF(MA(VOL,5),1)*240;
ABC29:=ABC25*ABC26/ABC27*100;
ABC30:=DYNAINFO(15)/OPEN/FINANCE(46)*100;
金钻擒妖:RANGE(ABC25,4,9) AND ABC24=1 AND ABC28>20 AND ABC29>4 AND ABC30>1.5 AND ABC7 AND CLOSE< 40 COLORYELLOW LINETHICK2;
DRAWTEXT(金钻擒妖,0.9,'★金钻擒妖'),,COLORMAGENTA;
DRAWICON(金钻擒妖,1,25);
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{金钻擒妖主图源码如下}STICKLINE((C-1日前的C)/1日前的C>=0.099,O,C,2,0),画黄色
输出操盘线:C的5日简单移动平均DOTLINE
输出趋势线:C的30日简单移动平均画洋红色
ABC1赋值:IF(NAMELIKE(1),1,0)=0
ABC2赋值:IF(NAMELIKE(2),1,0)=0
ABC3赋值:IF(NAMELIKE(3),1,0)=0
ABC4赋值:IF(CODELIKE(4),1,0)=0
ABC5赋值:IF(CODELIKE(5),1,0)=0
ABC6赋值:IF(CODELIKE(6),1,0)=0
ABC7赋值:ABC1 AND ABC2 AND ABC3 AND ABC5 AND ABC6
ABC8赋值:IF(开盘价<=1日前的开盘价,0,最高价-开盘价和开盘价-1日前的开盘价较大值)
ABC9赋值:IF(开盘价>=1日前的开盘价,0,开盘价-最低价和开盘价-1日前的开盘价较大值)
ABC10:=5的ABC8日累和
ABC11:=5的ABC9日累和
ABC12:=IF(ABC10>ABC11,(ABC10-ABC11)/ABC10,IF(ABC10=ABC11,0,(ABC10-ABC11)/ABC11))
ABC13:=ABC12的5日简单移动平均
ABC14:=IF(开盘价<=1日前的开盘价,0,最高价-开盘价和开盘价-1日前的开盘价较大值)
ABC15:=IF(开盘价>=1日前的开盘价,0,开盘价-最低价和开盘价-1日前的开盘价较大值)
ABC16:=3的ABC14日累和
ABC17:=3的ABC15日累和
ABC18:=IF(ABC16>ABC17,(ABC16-ABC17)/ABC16,IF(ABC16=ABC17,0,(ABC16-ABC17)/ABC17))
ABC19:=ABC18的3日简单移动平均
ABC20:=2日内收盘价最高值
ABC21:=上次ABC20< 2日前的ABC20距今天数
ABC22:=IF(INBLOCK(1),0.2,IF(INBLOCK(2),0.2,IF(INBLOCK(3),0.05,0.1)))
ABC23:=收盘价>=ZTPRICE(1日前的收盘价,ABC22) AND 收盘价=最高价 AND 开盘价!=最高价
ABC24:=REF(BARSLASTCOUNT(ABC23),1)
ABC25:=(开盘价-1日前的收盘价)/1日前的收盘价*100
ABC26:=开盘金额/开盘价/100
如果当前流通股本< 100000返回100000否则返回当前流通股本
ABC28:=ABC26/REF(成交量的5日简单移动平均,1)*240
ABC29:=ABC25*ABC26/ABC27*100
ABC30:=开盘金额/开盘价/FINANCE(46)*100
DRAWTEXT(RANGE(ABC25,4,9) AND ABC24=1 AND ABC28>20 AND ABC29>4 AND ABC30>1.5 AND ABC7 AND 收盘价< 40,L*0.99,' ★金钻擒妖'),COLORFF00FF
DRAWICON(RANGE(ABC25,4,9) AND ABC24=1 AND ABC28>20 AND ABC29>4 AND ABC30>1.5 AND ABC7 AND 收盘价< 40,L,25)
{金钻擒妖副图源码如下}ABC1赋值:IF(NAMELIKE(1),1,0)=0
ABC2赋值:IF(NAMELIKE(2),1,0)=0
ABC3赋值:IF(NAMELIKE(3),1,0)=0
ABC4赋值:IF(CODELIKE(4),1,0)=0
ABC5赋值:IF(CODELIKE(5),1,0)=0
ABC6赋值:IF(CODELIKE(6),1,0)=0
ABC7赋值:ABC1 AND ABC2 AND ABC3 AND ABC5 AND ABC6
ABC8赋值:IF(开盘价<=1日前的开盘价,0,最高价-开盘价和开盘价-1日前的开盘价较大值)
ABC9赋值:IF(开盘价>=1日前的开盘价,0,开盘价-最低价和开盘价-1日前的开盘价较大值)
ABC10:=5的ABC8日累和
ABC11:=5的ABC9日累和
ABC12:=IF(ABC10>ABC11,(ABC10-ABC11)/ABC10,IF(ABC10=ABC11,0,(ABC10-ABC11)/ABC11))
ABC13:=ABC12的5日简单移动平均
ABC14:=IF(开盘价<=1日前的开盘价,0,最高价-开盘价和开盘价-1日前的开盘价较大值)
ABC15:=IF(开盘价>=1日前的开盘价,0,开盘价-最低价和开盘价-1日前的开盘价较大值)
ABC16:=3的ABC14日累和
ABC17:=3的ABC15日累和
ABC18:=IF(ABC16>ABC17,(ABC16-ABC17)/ABC16,IF(ABC16=ABC17,0,(ABC16-ABC17)/ABC17))
ABC19:=ABC18的3日简单移动平均
ABC20:=2日内收盘价最高值
ABC21:=上次ABC20< 2日前的ABC20距今天数
ABC22:=IF(INBLOCK(1),0.2,IF(INBLOCK(2),0.2,IF(INBLOCK(3),0.05,0.1)))
ABC23:=收盘价>=ZTPRICE(1日前的收盘价,ABC22) AND 收盘价=最高价 AND 开盘价!=最高价
ABC24:=REF(BARSLASTCOUNT(ABC23),1)
ABC25:=(开盘价-1日前的收盘价)/1日前的收盘价*100
ABC26:=开盘金额/开盘价/100
如果当前流通股本< 100000返回100000否则返回当前流通股本
ABC28:=ABC26/REF(成交量的5日简单移动平均,1)*240
ABC29:=ABC25*ABC26/ABC27*100
ABC30:=开盘金额/开盘价/FINANCE(46)*100
输出金钻擒妖:RANGE(ABC25,4,9) AND ABC24=1 AND ABC28>20 AND ABC29>4 AND ABC30>1.5 AND ABC7 AND 收盘价< 40 画黄色 线宽为2
当满足条件金钻擒妖时,在0.9和'★金钻擒妖'位置书写文字
当满足条件金钻擒妖时,在1和25之间画图标