通达信强主升段副图指标 只做趋势强度主升段,做完收手!源码附图

{强主升段Y源码如下}
上趋势:=MA(LOW,20)*1.2;
次上趋势:=MA(LOW,20)*1.1;
次下趋势:=MA(HIGH,20)*0.9;
下趋势:=MA(HIGH,20)*0.8;

趋势强度:=IF(C>次上趋势,IF(C>上趋势,4,3),IF(C>次下趋势 AND C<次上趋势,2,IF(C<下趋势,0,1)));

强主升段:(趋势强度=4)*1.2,COLORRED,LINETHICK3;


N:=13;M:=5;{移动平均参数}
SCCD:=STR2CON(DPZSCODE);
LC:=REF(CLOSE,1);
HYC:=HY_INDEXC;{行业收盘价}
HYLC:=REF(HYC,1);

SRSI:=SMA(MAX(CLOSE-LC,0),N,1)/(SMA(ABS(CLOSE-LC),N,1))*100;{个股相对强弱}
HYRSI:=SMA(MAX(HYC-HYLC,0),N,1)/(SMA(ABS(HYC-HYLC),N,1))*100;{行业相对强弱}
DPRSI:=SMA(MAX(INDEXC-REF(INDEXC,1),0),N,1)/(SMA(ABS(INDEXC-REF(INDEXC,1)),N,1))*100;{大盘相对强弱}
个股:=MA(SRSI,M),LINETHICK2,COLORRED;{个股相对强弱均线}
行业:=MA(HYRSI,M),COLORYELLOW;{行业相对强弱均线}
大盘:=MA(DPRSI,M),COLORCYAN;{大盘相对强弱均线};






强于行业大盘:(个股>行业 AND 个股>大盘)*0.6,COLORYELLOW,LINETHICK2;



换:=100*VOL/(FINANCE(7)/100);
EE2:=(REF(换,1)/240)*FROMOPEN;
EE3:=(3/240)*FROMOPEN;
ER5:=NOT(NAMELIKE('S') OR NAMELIKE('*S'))&&VOL>1&&DYNAINFO(39)>1;{去除ST和停牌股}
ER6:=BARSLASTCOUNT(FINANCE(7)=REF(FINANCE(7),1))>=60&&ER5; {去除除权股};
均:=0.01*AMOUNT/VOL;{食碗面}
W2:=BARSLAST(UPNDAY(EMA(C,360),5));
W5:=IF(均=LLV(均,W2)&&EMA(C,360)>EMA(C,180),L,DRAWNULL);
W6:=FILTERX(W5,W2);
周0:=BARSLAST(W6);
K:=周0-9;
SD1:=周0>=1&&周0<=2&&CURRBARSCOUNT<=CONST(周0+1)&&CURRBARSCOUNT>=CONST(K+1)&&O<=C&&均>=REF(均,1)&&REF(均,1)<REF(均,2)&&换>EE2&&ER6;
SD2:=周0>=1&&周0<=2&&CURRBARSCOUNT<=CONST(周0+1)&&CURRBARSCOUNT>=CONST(K+1)&&O<=C&&均>=REF(均,1)&&REF(C,1)<REF(C,2)&&换>EE2&&ER6;
牛股启动:(SD1 OR SD2)*2.5;







板:=C/REF(C,1)>1.099 AND H>L AND H=C;
{KL:IF(C>=REF(C,1),100*(WINNER(CLOSE)-WINNER(L)),-100*(WINNER(O)-WINNER(L)));}
KL:=100*(WINNER(CLOSE)-WINNER(REF(C,1))),NODRAW;
KL1:=100*(WINNER(CLOSE)-WINNER(REF(C,2))),NODRAW;

LW:=SUM(KL,5),COLORWHITE;
LW10:=SUM(KL,10),COLORWHITE,COLORYELLOW, LINETHICK1;
LW20:=SUM(KL,20),COLORWHITE,COLORYELLOW, LINETHICK2;

百高:=REF(HHV(KL,100),1),COLORWHITE;
年高:=REF(HHV(KL,240),1),COLORWHITE;
百高1:=REF(HHV(KL1,100),1),COLORWHITE;
年高1:=REF(HHV(KL1,240),1),COLORWHITE;
T0:=BARSLAST(年高);
突破线:=REF(KL,T0);

突破1:=IF(KL=HHV(KL,240),C,0);
T1:=BARSLAST(突破1);
突破线1:=REF(C,T1);
突破2:=IF(KL=HHV(KL,100),C,0);
T2:=BARSLAST(突破2);
突破线2:=REF(C,T2);
突破3:=IF(KL1=HHV(KL1,240),C,0);
T3:=BARSLAST(突破3);
突破线3:=REF(C,T3);
突破4:=IF(KL1=HHV(KL1,100),C,0);
T4:=BARSLAST(突破4);
突破线4:=REF(C,T4);
穿破:=(T1<=100 AND CROSS(C,突破线1)) OR (T2<=100 AND CROSS(C,突破线2)) OR (T3<=100 AND CROSS(C,突破线3)) OR (T4<=100 AND CROSS(C,突破线4));
日:=CCI;
周:=CCI#WEEK;
月:=CCI#MONTH;
周突破:(周>0 AND 周-REF(周,1)>90),COLORMAGENTA,NODRAW;
月突破:(月>0 AND 月-REF(月,1)>70),COLORMAGENTA,NODRAW;
周月突破:=(周>0 AND 周-REF(周,1)>90) OR (月>0 AND 月-REF(月,1)>70),COLORGREEN;
STICKLINE(周突破,0,0.8,1,0),COLORMAGENTA;
STICKLINE(月突破,0,0.8,2,0),COLORMAGENTA;
DRAWTEXT(月突破,0.8,'月突破'),COLORWHITE;
DRAWTEXT(周突破,0.8,'周突破'),COLORWHITE;




{雷霆OBVY源码如下}
VAR1:=OBV-MA(OBV,30);
VAR2:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
STICKLINE(VAR1>0,0,VAR1,1,0),COLORRED;
STICKLINE(VAR1<0,0,VAR1,1,0),COLORCYAN;
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VAR2),0),COLORWHITE;
OBV30:MA(OBV,30),COLORYELLOW;
VAR3:=OBV-OBV30;
VAR4:=BARSLAST(REF(CROSS(OBV,OBV30),1));
VAR5:=REF(CLOSE,VAR4+1)>CLOSE AND OBV>REF(OBV,VAR4+1) AND CROSS(OBV,OBV30);
VAR8:=BARSLAST(REF(CROSS(OBV30,OBV),1));
VAR9:=REF(C,VAR8+1)<C AND REF(OBV,VAR8+1)>OBV AND CROSS(OBV30,OBV);
STICKLINE(VAR3>0,OBV,OBV30,1,0),COLORRED;
STICKLINE(VAR3<0,OBV,OBV30,1,0),COLOR00FF00;
DRAWICON(CROSS(OBV,OBV30),OBV30,1);
DRAWICON(CROSS(OBV30,OBV),OBV30,2);
STICKLINE(OBV<REF(OBV,1),OBV30,OBV,1,0),COLORFFFF00;
STICKLINE(OBV>REF(OBV,1),OBV30,OBV,1,0),COLORFF00FF;
STICKLINE(VAR5,0,OBV,3,0),COLOR00FF00;
DRAWTEXT(VAR5,OBV30,' 底背离'),COLORWHITE;
DRAWTEXT(VAR9,OBV30,' 顶背离'),COLORWHITE;
OBV创新高是牛股:PLOYLINE(1,CONST(OBV)),COLOR008888,LINETHICK1;



未来函数检测结果如下:
该公式包含未来函数:WINNER
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网仅为互联网文章,所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图