支撑压力-通达信指标
【通达信指标】重心、压力、支撑主图指标公式
【通达信指标】重⼼、压⼒、⽀撑主图指标公式PT := REF(HIGH,1)-REF(LOW,1);重⼼:(HIGH + LOW + CLOSE)/3,NODRAW;压⼒Ⅰ: 2*重⼼-LOW,NODRAW;压⼒Ⅱ:重⼼ + PT,NODRAW;⽀撑Ⅰ:2*重⼼-HIGH,NODRAW;⽀撑Ⅱ: 重⼼ - PT,NODRAW;MA5:MA(C,5),COLOR888899;MA20:MA(C,20),COLOR0099FF;MA30:MA(C,30),COLORYELLOW;MA60:MA(C,60),COLOR00FF00;MA250:MA(C,250),COLOR0099FF;AAA:=CONST(HHV(H,90));R1:=MA(CLOSE,1);R2:=MA(CLOSE,3);R3:=(MA(R2,1)*1);R4:=(MA(R2,3)*1);DRAWTEXT(CROSS(R3,R4),(LOW-0.1),'B'),COLORBDB76B;X1:=(C+L+H)/3;DD:=TOTALCAPITAL;SS:=FINANCE(7);GG:=FINANCE(33);TH:=DYNAINFO(39);A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1); LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'S'),COLORGREEN;双线持币:HHV(MA(HIGH,(3)),2),LINETHICK2,COLOR00FF00;单线持股:LLV(MA(HIGH,(3)),1),LINETHICK2,COLOR0000FF;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VAR12:=(HIGH+LOW+CLOSE)/3;VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0);VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR18:=100-ABS(VAR17);VAR19:=IF(VAR18<90,VAR18,100);VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,HIGH*1.02,'⼤笔出货'),LINETHICK1,COLORFFCC66;AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;⽼⿏仓:=BB1 AND CC1 AND DD1 AND EE1,LINETHICK0;DRAWTEXT(⽼⿏仓,(LOW* 0.99),'⽼⿏仓'),COLOR40CCFF;A74:=MA(CLOSE,20);A75:=(CLOSE > MA(CLOSE,5));A76:=(MA(CLOSE,5) > MA(CLOSE,10));A77:=(CLOSE > MA(CLOSE,10));A78:=(MA(CLOSE,5) > MA(CLOSE,20));A79:=(CLOSE > MA(CLOSE,20));A710:=REF(A74,1);A711:=(A74 > A710);AVX:=(((((IF(A75,10,(0 - 10)) + IF(A76,10,(0 - 10))) + IF(A77,10,(0 - 10)))+ IF(A78,10,(0 - 10))) + IF(A79,10,(0 - 10))) + IF(A711,10,(0 - 10)));DSLX:=(CLOSE / INDEXC);DSLX1:=MA(DSLX,5);DSLX2:=MA(DSLX,10);V1:=MA(VOL,5);V2:=MA(VOL,10);T1:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T2:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T3:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)),1,0));T4:=CONST(IF(C<200 AND ((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)),1,0));T5:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0));T6:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0));T7:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0));T8:=CONST(IF(C<200 AND ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0));T9:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0)); T10:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0)); T11:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0)); T12:=CONST(IF(C<200 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0)); T13:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)),1,0)); T14:=CONST(IF( C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)),1,0)); T15:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)),1,0)); T16:=CONST(IF(C<200 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)),1,0)); T17:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T18:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 >= V2)),1,0));T19:=CONST(IF(C>200 AND (CROSS(AVX,1) AND (V1 < V2)),1,0));T20:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 >= V2)),1,0));T21:=CONST(IF(C>200 AND (CROSS(1,AVX) AND (V1 < V2)),1,0));T22:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)),1,0));T23:=CONST(IF(C>200 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)),1,0));T24:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)),1,0));T25:=CONST(IF(C>200 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)),1,0));DRAWTEXT(T1=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'量能理想,明显⾛强,中线参与,仓位在2/3左右'),COLORFF00FF ;DRAWTEXT(T2=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'⾛势趋强,还显不⾜,短线进场,仓位在1/2左右'),COLORFF00FF ;DRAWTEXT(T3=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'量价良好,没有明显⾛强,短线进场,仓位1/2左右'),COLORFF00FF ;DRAWTEXT(T4=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'形态尚可,量能不⾜,未完全⾛强,短线参与,仓位1/3左右'),COLORFF00FF ;DRAWTEXT(T5=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'形态变坏,重仓者减持⼤半,清仓者观望'),COLORFF00FF ;DRAWTEXT(T6=1 AND CURRBARSCOUNT=60,AAA*0.98,'随⼤盘⼀起下跌,明显缩量⾛势,考虑到风险,减持或清仓'),COLORFF00FF ;DRAWTEXT(T7=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'该股放量下跌,⾛势明显偏弱,离场观望'),COLORFF00FF ;DRAWTEXT(T8=1 AND CURRBARSCOUNT=60,AAA-(AAA*0.03),'该股缩量下跌,⾛势偏弱,离场观望。
通达信支撑与压力的神级主图指标公式
通达信支撑与压力的神级主图指标公式局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);XA:=DRAWLINE(极点保留=-1,L,REF(极点保留,1)=-1,REF(L,1),1);XB:=DRAWLINE(极点保留=1,H,REF(极点保留,1)=1,REF(H,1),1);XAS:=DRAWLINE(极点保留=-1,XB,REF(极点保留,1)=-1,REF(XB,1),1);XBS:=DRAWLINE(极点保留=1,XA,REF(极点保留,1)=1,REF(XA,1),1);XA45:=(XA+XAS)/2; XB45:=(XB+XBS)/2;XA63:=(XAS-XA)*3/4+XA; XB63:=XB-(XB-XBS)*3/4;DRAWBAND(XA45,RGB(0,150,100),XA63,RGB(0,150,100));DRAWBAND(XB45,RGB(185,96,9),XB63,RGB(185,96,9));局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)),CIRCLEDOT,COLORYELLOW,LINETHICK5;压1:IF(BETWEEN(XA45,XB45,XB63),XA45,DRAWNULL),COLOR0088 00;压2:IF(BETWEEN(XA63,XB45,XB63),XA63,DRAWNULL),COLOR0088 00;过压底:REF(C,1)<XA45 AND C>XA45 AND C<35 AND CAPITAL<6000000,COLORYELLOW,NODRAW;过压顶:REF(C,1)<XA63 AND C>XA63 AND C<35 AND CAPITAL<6000000,NODRAW;支撑底:REF(C,1)<XB63 AND C>XB63 AND C<35 AND CAPITAL<6000000,NODRAW;支撑顶:REF(C,1)<XB45 AND C>XB45 AND C<35 AND CAPITAL<6000000,NODRAW;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);量5:=EMA(EMA(VOL,5),5);量35:=EMA(EMA(VOL,35),35);VAR11:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));成交:=VOL;主买:=IF(CLOSE>OPEN,VAR11*(HIGH-LOW),IF(CLOSE<OPEN,VAR11*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLOR00E521;主卖:=IF(CLOSE>OPEN,VAR11*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VAR11*(HIGH-LOW),VOL/2));主买力度:=VOL/(主买-主卖);买卖比:=主买/主卖;昨日比:=买卖比/REF(买卖比,1);净买: (主买-主卖)/100,NODRAW;抢筹:=买卖比>4,NODRAW;BB:=净买<0;净买天数:BARSLAST(BB),COLORMAGENTA,NODRAW;STICKLINE(净买>0,C,O,3,0),COLORRED;STICKLINE(净买<0,C,O,1.8,0),COLORGREEN;STICKLINE(抢筹,C,O,2,0),COLORYELLOW;STICKLINE(主买力度>9,H,O,3,0),COLORWHITE;。
通达信 压力位和支撑位指标
通达信压力位和支撑位指标
通达信压力位和支撑位指标是技术分析中常用的指标之一,用于预测股价走势。
压力位是指股价上涨到一定程度后,遇到下行压力的位置,价格停止涨幅的位置。
通
达信压力位指标通常通过计算历史数据中的最高价和最低价,确认当前股价可能到达的压
力位。
1. 计算方法:通达信压力位和支撑位指标的计算方法基于历史数据。
支撑位指标的
计算方法是从最高价开始,由下往上逐一确定最低价。
压力位的指标计算方法是相反的,
从最低价开始,由上往下逐一确定最高价。
在指标的参数设置中,通常设置包括计算周期
和最近的几个交易日等。
2. 显示方式:压力位和支撑位指标的显示方式是通过直线和点来表示。
支撑线一般
画在股价图下方,长为数条K线,标注自下而上的最低价。
压力位就反之,画在线的上方,标注自上而下的最高价。
点位显示一般位于支撑或压力线的交汇点或最高/最低点上。
3. 使用方法:在股市交易中使用压力位和支撑位指标的方法有多种,具体取决于交
易者的风险偏好和交易策略。
一般而言,如果股价上行,支撑线是止损点,而压力线则是
卖出点,它们都是交易者选定的止损线和盈利点。
如果股价下行,那么支撑线就是最佳买
入点,而压力线则表示卖出时的机会。
小结:
通达信压力位和支撑位指标是预测股价行情的重要技术指标,用于帮助交易者选择买
入和卖出的时机,并设定止损点和盈利点。
他们的计算方法基于历史数据,通过直线和点
的方式表示,在交易中的使用方法也根据股价上涨和下跌来确定其具体含义。
支撑压力 通达信指标计算公式源码
支撑压力通达信指标计算公式源码
支撑压力是股票分析中常用的技术指标之一,用于判断股价的
支撑和压力位。
下面是支撑压力指标的通达信计算公式源码。
支撑位计算公式
支撑位 = 最低价 - (最高价 - 最低价) ×支撑系数
其中,最低价表示一段时间内的最低股价,最高价表示一段时
间内的最高股价,支撑系数是根据历史数据和分析师的判断确定的。
压力位计算公式
压力位 = 最高价 + (最高价 - 最低价) ×压力系数
压力位与支撑位的计算方式类似,只是使用的是最高价。
示例代码
以下是通达信指标计算公式的示例代码,用于计算支撑位和压力位:
计算支撑位
support = low - (high - low) * support_coefficient
计算压力位
resistance = high + (high - low) * resistance_coefficient
这段示例代码是使用Python编写的,可以根据实际需求进行修改和使用。
总结
支撑压力是股票分析中重要的指标之一,通过计算支撑位和压力位,可以帮助投资者判断股价的上下行趋势。
通达信指标计算公式源码提供了一种计算支撑位和压力位的示例代码,可以帮助投资者更好地使用该指标进行股票分析和交易决策。
以上是关于支撑压力指标计算公式的通达信源码的文档。
压力支撑线通达信指标公式源码
压力支撑线通达信指标公式源码下面是使用天软通达信软件实现压力支撑线指标的源代码(C语言):```c#include "stdafx.h"#include "stdio.h"#include "stdlib.h"#define N 20 // 计算收盘价波动性和运算平均的周期#define M 200 // 计算动态压力支持线的周期//计算标准差的函数float StdDeviation(float* data, int length)float sum = 0;float mean = 0;float variance = 0;//计算均值for (int i = 0; i < length; i++)sum += data[i];}mean = sum / length;//计算方差for (int i = 0; i < length; i++)variance += (data[i] - mean) * (data[i] - mean); }variance /= length;//计算标准差float stdDeviation = sqrt(variance);return stdDeviation;int main//获取收盘价数据float closePrice[N]; // 存储近N天的收盘价for (int i = 0; i < N; i++)scanf("%f", &closePrice[i]);}//计算动态压力支持线的公式float ps[N]; // 存储动态压力支持线的值for (int i = 0; i < N; i++)float sum = 0;for (int j = 0; j < M; j++)sum += closePrice[N - M + j];}ps[i] = sum / M + 2 * StdDeviation(closePrice, N);}//输出结果for (int i = 0; i < N; i++)printf("动态压力支持线:%f\n", ps[i]);}return 0;```以上就是使用天软通达信软件实现压力支撑线指标的源代码。
通达信 压力位和支撑位指标
通达信压力位和支撑位指标
通达信是一个广泛使用的股票交易软件,它提供了许多有用的技术指标来帮助股民做出更好的交易决策。
其中,压力位和支撑位指标是非常受欢迎的指标之一。
压力位指标是指股票价格在短期内遇到的阻力水平。
在股票价格上涨时,如果价格达到了压力位,则有可能出现价格回调的情况。
反过来,在股票价格下跌时,如果价格下跌到了支撑位,则有可能出现价格反弹的情况。
通达信中的压力位指标可以通过K线图中的高点来计算。
具体来说,将前期涨势的最高点作为压力位,如果价格再次到达这个点,就有可能会受到阻力而回调。
支撑位指标则是相反的,它是指股票价格在短期内遇到的支撑水平。
在股票价格下跌时,如果价格跌到了支撑位,则有可能出现价格反弹的情况。
反过来,在股票价格上涨时,如果价格上涨到了压力位,则有可能出现价格回调的情况。
通达信中的支撑位指标可以通过K线图中的低点来计算。
具体来说,将前期跌势的最低点作为支撑位,如果价格再次下跌到这个点,就有可能会受到支撑而反弹。
总之,通达信的压力位和支撑位指标是非常实用的技术指标,它能够帮助股民更好地预测股票价格的走势,做出更加明智的交易决策。
- 1 -。
支撑压力 通达信指标公式实现源码
支撑压力通达信指标公式实现源码**一、背景介绍**在股票交易中,支撑压力是技术分析中重要的概念之一。
通过研究支撑压力,投资者可以更好地预测股价的上涨和下跌趋势,并作出相应的交易决策。
为了实现对支撑压力的分析,我们可以使用通达信指标公式。
**二、通达信指标公式**通达信是国内著名的股票分析软件,并提供了丰富的指标公式库。
通过使用通达信指标公式,我们可以方便地计算出支撑压力等相关指标的数值。
下面是一个示例通达信指标公式:公式1:支撑压力=前一个低点的最低价公式2:支撑位=2*支撑压力-前一个高点的最低价公式3:压力位=2*支撑压力-前一个低点的最高价**三、源码实现**为了实现通达信指标公式,我们可以使用编程语言来编写相应的源码。
下面是一个简单示例的源码实现:输入所需数据prev_lowest = 100.0 # 前一个低点的最低价prev_highest = 120.0 # 前一个低点的最高价prev_high = 150.0 # 前一个高点的最低价计算支撑压力、支撑位和压力位support_pressure = prev_lowestsupport_level = 2 * support_pressure - prev_highpressure_level = 2 * support_pressure - prev_lowest打印结果print("支撑压力:", support_pressure)print("支撑位:", support_level)print("压力位:", pressure_level)通过运行上述源码,我们可以得到支撑压力、支撑位和压力位的计算结果。
**四、总结**通过实现通达信指标公式源码,我们可以方便地计算出支撑压力等相关指标的数值。
这些指标能够帮助投资者更好地分析股价走势,从而作出更明智的交易决策。
然而,投资决策应当综合考虑多个因素,并通过实践和经验不断优化。
通达信支撑压力线指标
通达信支撑压力线指标通达信支撑压力线指标是一种技术分析工具,用于帮助投资者判断市场的支撑位和压力位。
通过绘制支撑线和压力线,可以帮助投资者更好地把握股票价格的走势,辅助决策买卖时机。
支撑线和压力线是根据股票价格的波动情况和历史数据绘制出来的。
支撑线是指股票价格在下跌过程中,出现了一定的阻力,停止下跌并开始反弹的价格水平。
投资者在分析股票价格时,可以将这个价格作为买入的信号,预期股票价格将向上反弹。
压力线则相反,是指股票价格在上涨过程中,出现了一定的阻力,停止上涨并开始回落的价格水平。
投资者可以将这个价格作为卖出的信号,预期股票价格将向下回落。
通达信支撑压力线指标的计算方法较为复杂,但是在通达信软件中,可以直接绘制出来,方便投资者使用。
在绘制支撑压力线时,可以根据不同的时间周期选择不同的参数,以适应不同的股票市场。
比如,在较短的时间周期内,可以选择较短的参数,以较小的价格波动为基准;而在较长的时间周期内,可以选择较长的参数,以较大的价格波动为基准。
通过不断调整参数,可以更准确地绘制出支撑压力线,提高分析的准确性。
通达信支撑压力线指标的应用主要体现在以下几个方面:1. 判断股票价格的上升和下跌趋势。
当股票价格连续多次触及支撑线并反弹时,表明股票价格有望上涨;而当股票价格连续多次触及压力线并回落时,表明股票价格有望下跌。
投资者可以根据这一特征,判断股票价格的走势,及时调整投资策略。
2. 确定买入和卖出时机。
当股票价格触及支撑线时,投资者可以选择买入股票,以预期股票价格的反弹;而当股票价格触及压力线时,投资者可以选择卖出股票,以预期股票价格的回落。
通过绘制支撑压力线,可以帮助投资者确定买入和卖出的时机,提高投资的成功率。
3. 确定止损和止盈位。
在股票交易中,止损和止盈是非常重要的策略。
通达信支撑压力线指标可以帮助投资者确定止损和止盈的位点。
当股票价格跌破支撑线时,投资者可以选择止损,以避免进一步的损失;而当股票价格突破压力线时,投资者可以选择止盈,以保护已经获利的部分。
支撑压力 通达信技术指标公式源码
支撑压力通达信技术指标公式源码概述这份文档提供了支撑压力技术指标在通达信软件中的源码和实现过程。
支撑压力指标是技术分析中的一种重要工具,用于判断股价在上涨或下跌过程中的支撑和压力水平,帮助投资者做出决策。
支撑压力指标公式支撑压力指标的计算涉及以下几个主要步骤:1. 计算每个交易日的支撑压力位:- 支撑位 = 最低价 - (昨日最高价 - 昨日最低价) * N- 压力位 = 最高价 + (昨日最高价 - 昨日最低价) * N其中,N是一个自定义的参数,用于确定支撑压力位与前一日价格范围的关系。
2. 绘制支撑压力线:根据计算得到的支撑位和压力位,将其以直线或曲线的形式绘制在股价走势图上,以便投资者在分析图表时能够清楚地看到支撑和压力的位置。
通达信技术指标公式源码以下是支撑压力指标在通达信软件中的源码示例:SUPPORT_PRESSURE(N) :=BEGINLOWEST = LOWESTDAY(N);HIGHEST = HIGHESTDAY(N);SUPPORT = LOWEST - (HIGHEST - LOWEST) * N;PRESSURE = HIGHEST + (HIGHEST - LOWEST) * N;DRAWLINE(SUPPORT, "Support", COLORRED);DRAWLINE(PRESSURE, "Pressure", COLORGREEN);END;该源码定义了一个名为SUPPORT_PRESSURE的函数,接受一个参数N,用于计算支撑压力位。
函数内部调用了通达信软件提供的内置函数LOWESTDAY和HIGHESTDAY,分别用于计算N日内的最低价和最高价。
然后根据上述公式计算支撑位和压力位,并使用DRAWLINE函数绘制相应的直线,以显示在股价走势图上。
结论本文档提供了支撑压力技术指标在通达信软件中的源码和实现过程。
通过使用该指标,投资者可以更好地判断股价的支撑和压力水平,并做出相应的投资决策。
通达信支撑位和压力位公式指标
通达信支撑位和压力位公式指标1、公式一{压力支撑}收:C,LINETHICK0;开:O,LINETHICK0;最高:H,LINETHICK0;最低:L,LINETHICK0;P:=(H+L+C)/3;压1:(P*2)-L;支1:(P*2)-H;压2:P+(压1-支1);支2:P-(压1-支1);压3:H+2*(P-L);支3:L-2*(H-P),COLORFFFF33;压4:H+3*(P-L);支4:L-3*(H-P);2、公式二上市日期:FINANCE(42)/100, NODRAW ;VAR1:=MA(CLOSE,5),COLOR00FFFF;VAR2:=MA(CLOSE,13),COLOR00FF33;VAR5:=MA(CLOSE,34),COLORFF9900;VAR6:=MA(CLOSE,54),COLORFF9900;VAR7:=((EMA(CLOSE,5)*7+EMA(CLOSE,5)*3)/10),COLORBBB BBB;VAR8:=DMA(EMA(CLOSE,12),SUM(VOL/CAPITAL,5)/3),LINETHICK2;VARA:=REF(CLOSE,1);VARE:=SMA(MAX(CLOSE-VARA,0),6,1)/SMA(ABS(CLOSE-VARA),6,1)*100;DRAWTEXT(DATE>700101 AND CROSS(84,VARE),HIGH,'☆机构减仓'),COLORGREEN;VARF:=(2*CLOSE+HIGH+LOW)/4;VAR10:=LLV(LOW,34);VAR11:=HHV(HIGH,34);VAR12:=EMA((VARF-VAR10)/(VAR11-VAR10)*100,6);VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,4);VAR14:=LLV(LOW,120);VAR15:=HHV(HIGH,120);VAR16:=VAR15-VAR14;DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VAR12>VAR13,3) AND REF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0),LOW,'★机构进场'),COLORYELLOW;STICKLINE(VAR7>VAR2,VAR2,VAR7,0.01,1),COLORFF00FF;STICKLINE(VAR7<VAR2,VAR2,VAR7,0.01,1),COLOR33FF33;RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;RSV12:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;K12:=SMA(RSV12,3,1);D12:=SMA(K12,3,1);J12:=3*K12-2*D12;RSV24:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;K24:=SMA(RSV24,3,1);D24:=SMA(K24,3,1);J24:=3*K24-2*D24;压力位:IF(CROSS(J24,J),H,REF(H,BARSLAST(CROSS(J24,J)))),COLOR00F F33,LINETHICK1;支撑位:IF(CROSS(J,J24),L,REF(L,BARSLAST(CROSS(J,J24)))),COLORCC3 3CC,LINETHICK1;支撑价:LLV(LOW,19) , COLOR009900,LINETHICK2;阻力价:HHV(HIGH,19),COLORFF9900, LINETHICK2;VAR4:EMA(C,21),COLOR0000FF, LINETHICK2;压力支撑主图N:=5;E:=(HIGH+LOW+OPEN+2*CLOSE)/5;AAA:=2*E-LOW,NODRAW;AB:=2*E-HIGH,NODRAW;ACC:=E+(HIGH-LOW),NODRAW;ADD:=E-(HIGH-LOW),NODRAW;今阻力:REF(AAA,1),COLORWHITE,NODRAW;今支撑:REF(AB,1),COLORYELLOW,NODRAW;明阻力:AAA,COLORCYAN,NODRAW;明支撑:AB,COLORMAGENTA,NODRAW;明突破:ACC,COLORGREEN,NODRAW;明反转:ADD,COLORLICYAN,NODRAW;{压力+支撑}压力:MA(REF(HHV(C,30),1),2),COLORRED;支撑:MA(REF(LLV(C,30),1),2),COLORRED;。
通达信优化支撑压力主图指标公式
通达信优化支撑压力主图指标公式通达信优化支撑压力主图指标公式股票软件源码如下:N:=5;NN:=100;AA:=REF(H,N)=HHV(H,2*N+1);AA1:=REF(L,N)=LLV(L,2*N+1);QY:=BACKSET(AA,N+1); QY1:=BACKSET(AA1,N+1);CC:=FILTER(QY,N) AND H=HHV(H,N+1); CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);DDD:=BARSLAST(CC); DD1:=BARSLAST(CC1);GDTS:=IF(CC,CURRBARSCOUNT,0);DDTS:=IF(CC1,CURRBARSCOUNT,0);DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);GDCS1:=CONST(DINGBUTS); DDCS1:=CONST(DDTS1);GDCS13:=CONST(REF(HIGH,GDCS1-1));DDCS13:=CONST(REF(L,DDCS1-1));DINGBUTS1:=REF(DINGBUTS,DDD+1);DDTS2:=REF(DDTS1,DD1+1);GDCS2:=CONST(DINGBUTS1); DDCS2:=CONST(DDTS2);M:=INTPART(3*N/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAA,M+1);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0);DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);ZGD:=HHV(H,60)*1.01.00;ZGD2:=CONST(ZGD);高点压力M:=DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUN T=GDCS11,H,1),COLORRED,LINETHICK2;低点支撑M:=DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUN T=DDCS11,L,1) COLORRED,LINETHICK2;高点压力1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT =GDCS1,H,1) ,COLORBLUE,LINETHICK2;低点支撑1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT =DDCS1,L,1),COLORBLUE,LINETHICK2;高点:=CONST(HHV(H,NN));低点:=CONST(LLV(L,NN));GJ:=(C+H+L+O)/4;明日阻力:=L+(GJ-L)+(C-L);明日支撑:=L+(C-GJ);明日阻力2:=L+2*(GJ-L)+(C-L);明日支撑2:=L+(C-GJ)-(GJ-L);今日阻力:=CONST(REF(明日阻力 , 1)),NODRAW;今日支撑:=CONST(REF(明日支撑 , 1)),NODRAW;今日阻力2:=CONST(REF(明日阻力2 , 1)),NODRAW;今日支撑2:=CONST(REF(明日支撑2 , 1)),NODRAW;STICKLINE(ISLASTBAR,今日阻力,今日阻力2,10,0),COLOR555555;DRAWTEXT(ISLASTBAR,今日阻力,' 阻'),COLOR0000FF;STICKLINE(ISLASTBAR,今日支撑,今日支撑2,10,0),COLOR555555;DRAWTEXT(ISLASTBAR,今日支撑,' 支'),COLOR00FF00;IF(BETWEEN(高点压力M,高点,低点),高点压力M,DRAWNULL),COLORWHITE,LINETHICK2;IF(BETWEEN(低点支撑M,高点,低点),低点支撑M,DRAWNULL),COLORWHITE,LINETHICK2;IF(BETWEEN(高点压力1,高点,低点),高点压力1,DRAWNULL),COLORGREEN,LINETHICK2;IF(BETWEEN(低点支撑1,高点,低点),低点支撑1,DRAWNULL),COLORGREEN,LINETHICK2;涨停:=C>REF(C,1)*1.099;开盘价:REF(O,BARSLAST(涨停)),COLORWHITE,CIRCLEDOT;DRAWNUMBER(涨停,L,O),COLORRED;C3:=REF(C,1);跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,4,0),COLORGREEN;STICKLINE(跌停,OPEN,CLOSE,3,0),COLORBLUE;DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;{原文链接:/THREAD-4453918-1-1.HTML};STICKLINE(V>=REF(V,1)*2,O,C,3,0)COLORBLUE;STICKLINE(V>=REF(V,1)*2,H,L,0,0)COLORBLUE;STICKLINE(C/REF(C,1)>=1.098,O,C,3,0)COLORRED;STICKLINE(C/REF(C,1)>=1.098,H,L,0,0)COLORRED;STICKLINE(C/REF(C,1)<=0.901,O,C,3,0)COLORBLUE;STICKLINE(C/REF(C,1)<=0.901,H,L,0,0)COLORBLUE;ZT:=C/REF(C,1)>1.097;BH:=BARSLAST(ZT);CZ:=REF(H,BH)-REF(L,BH);STICKLINE(C AND BH<100,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),3,0),COLORRED;STICKLINE(C AND BH<100,REF(L,BH),REF(L,BH),3,0),COLORWHITE,CIRCLEDOT;STICKLINE(C AND BH<100,REF(H,BH),REF(H,BH),3,0),COLORWHITE;HHH:=CONST(HHV(H,100));LLL:=CONST(LLV(L,100));HH:=HHH-LLL;TJ2:= CURRBARSCOUNT=58;总家数:INDEXADV+INDEXDEC,NODRAW;涨家数:INDEXADV,NODRAW;跌家数:INDEXDEC,NODRAW;差数:INDEXADV-INDEXDEC,NODRAW;半分位:=(O+C)/2;昨半分位:=REF(半分位,1);STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0);DRAWNUMBER(ISLASTBAR,昨半分位,昨半分位);DRAWTEXT(ISLASTBAR,昨半分位,' 昨半分位');底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;{原文链接:/THREAD-4648365-1-1.HTML};VAR3:=PEAKBARS(3,10,1)<10;VAR5:=IF(VAR3=1,2,0);顶:= IF(VAR5=2,2,0);DRAWICON(顶>REF(顶,1),H*1.005,2);DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)),L,1);DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),H,12);DRAWGBK(1,RGB(0,0,0),RGB(0,0,0),0,'00',0);{原文链接:/THREAD-4726228-1-1.HTML};生命线:=(EMA(C,10)*14+EMA(C,20)*6)/20;生命线12:=(EMA(生命线,10)*14+EMA(生命线,20)*6)/20;变异1:=生命线+生命线-生命线12;变异线1:=(EMA(变异1,10)*14+EMA(变异1,20)*6)/20;趋势线:变异1+变异1-变异线1,COLORRED;平衡线:(EMA(趋势线,10)*14+EMA(趋势线,20)*6)/20,COLORWHITE;AAA1:=CLOSE>REF(CLOSE,1) AND REF(CLOSE,1)>REF(CLOSE,2) AND REF(CLOSE,1)<REF(CLOSE,3) ANDIF(REF(CLOSE,3)<REF(CLOSE,4),1,IF(REF(CLOSE,4)<REF(CLOSE,5), REF(CLOSE,1)<REF(CLOSE,4) OR (REF(CLOSE,2)<REF(CLOSE,4) ANDREF(CLOSE,3)>=REF(CLOSE,5)),IF(REF(CLOSE,5)<REF(CLOSE,6),1, REF(CLOSE,6)<REF(CLOSE,7))));BBB1:=CLOSE<REF(CLOSE,1) AND REF(CLOSE,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,3) ANDIF(REF(CLOSE,3)>REF(CLOSE,4),1,IF(REF(CLOSE,4)>REF(CLOSE,5), REF(CLOSE,1)>REF(CLOSE,4) OR (REF(CLOSE,2)>REF(CLOSE,4) ANDREF(CLOSE,3)<=REF(CLOSE,5)),IF(REF(CLOSE,5)>REF(CLOSE,6),1,REF(CLOSE,6)>REF(CLOSE,7))));DRAWICON(AAA1 AND CLOSE>REF(OPEN,3),0.99*LOW,1);DRAWICON(BBB1 AND CLOSE<REF(CLOSE,3),HIGH*1.01,2);DRAWTEXT(AAA1 AND CLOSE>REF(OPEN,3),LOW*0.98,'平底翻红');DRAWTEXT(BBB1 AND CLOSE<REF(CLOSE,3),HIGH*1.02,'平顶翻绿');{通达信股票指标公式}LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),COLORA6E500;DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLOR1880FF;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);VAR26:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;VAR27:=REVERSE(VAR26);VAR28:=SMA(VAR26,3,1);波段王:= SMA(VAR28,3,1);波段鬼:= SMA(波段王,8,1);地狱:DRAWICON(CROSS(波段王,波段鬼) AND 波段王<40,LOW,1);天堂: DRAWICON(CROSS(波段鬼,波段王) AND 波段鬼>75,HIGH,2);DRAWTEXT(CROSS(波段王,波段鬼) AND 波段王<40,LOW*1.01,'低吸做波段'), COLORWHITE;DRAWTEXT(CROSS(波段鬼,波段王) AND 波段鬼>75,HIGH*1.01,'减磅'),COLOR00FF00;H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLOR005100,,LINETHICK2,DOTLINE;支撑:L1+P1*0.5/8,COLOR000075,,LINETHICK2,DOTLINE;现价:=CLOSE,COLORWHITE,LINETHICK1;QQ截图未命名.jpg(24.28 KB, 下载次数: 11)。
压力支撑线指标公式(通达信)
压力支撑线指标公式(通达信)展开全文N:=75;P:=5;P1:=10;{N为多少天内的高低值参数,我以自已的初始K线根数定义。
P1、P2为短、长支撑压力取点参数}A1:=REF(H,P)=HHV(H,2*P+1);B1:=FILTER(A1,P);C1:=BACKSET(B1,P+1);D1:=FILTER(C1,P);E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);F1:=E1>REF(E1,1);短压:DRAWLINE(D1,H,F1,H,1),COLORCYAN;A2:=REF(L,P)=LLV(L,2*P+1);B2:=FILTER(A2,P);C2:=BACKSET(B2,P+1);D2:=FILTER(C2,P);E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);F2:=E2>REF(E2,1);短支:DRAWLINE(D2,L,F2,L,1),COLORLIRED;AA1:=REF(H,P1)=HHV(H,2*P1+1);BB1:=FILTER(AA1,P1);CC1:=BACKSET(BB1,P1+1);DD1:=FILTER(CC1,P1);EE1:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);FF1:=EE1>REF(EE1,1);长压:DRAWLINE(DD1,H,FF1,H,1),COLORGREEN;AA2:=REF(L,P1)=LLV(L,2*P1+1);BB2:=FILTER(AA2,P1);CC2:=BACKSET(BB2,P1+1);DD2:=FILTER(CC2,P1);EE2:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);FF2:=EE2>REF(EE2,1);长支:DRAWLINE(DD2,L,FF2,L,1),COLORRED; STICKLINE(C>=O,C,O,3,0),COLOR000045;STICKLINE(C>=O,C,O,2.5,0),COLOR000065; STICKLINE(C>=O,C,O,2,0),COLOR000085;STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5; STICKLINE(C>=O,C,O,1,0),COLOR0000C5;STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5; STICKLINE(C>=O,H,L,0,0),COLOR0000F5;STICKLINE(C<O,C,O,3,0),COLOR353500;STICKLINE(C<O,C,O,2.5,0),COLOR454500;STICKLINE(C<O,C,O,2,0),COLOR555500;STICKLINE(C<O,C,O,1.5,0),COLOR656500;STICKLINE(C<O,C,O,1,0),COLOR757500;STICKLINE(C<O,C,O,0.5,0),COLOR858500;STICKLINE(C<O,H,L,0,0),COLOR959500;高:=REFDATE(HHV(H,N),DATE);低:=REFDATE(LLV(L,N),DATE);H1:=高-(高-低)*0.191;H2:=高-(高-低)*0.382;H3:=高-(高-低)*0.5;H4:=高-(高-低)*0.618;H5:=高-(高-低)*0.809;DRAWTEXT(CURRBARSCOUNT=1,高,'高'),COLORGREEN; DRAWTEXT(CURRBARSCOUNT=1,H1,'809'),COLORCYAN; DRAWTEXT(CURRBARSCOUNT=1,H2,'618'),COLORGRAY; DRAWTEXT(CURRBARSCOUNT=1,H3,'中'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1,H4,'382'),COLORLIRED;DRAWTEXT(CURRBARSCOUNT=1,H5,'191'),COLORMAGENT A;DRAWTEXT(CURRBARSCOUNT=1,低,'低'),COLORRED;STICKLINE(CURRBARSCOUNT=13,高,高,100,-1),COLORGREEN;STICKLINE(CURRBARSCOUNT=13,H1,H1,100,-1),COLORCYAN;STICKLINE(CURRBARSCOUNT=13,H2,H2,100,-1),COLORGRAY;STICKLINE(CURRBARSCOUNT=13,H3,H3,100,-1),COLORYELLOW;STICKLINE(CURRBARSCOUNT=13,H4,H4,100,-1),COLORLIRED;STICKLINE(CURRBARSCOUNT=13,H5,H5,100,-1),COLORMAGENTA;STICKLINE(CURRBARSCOUNT=13,低,低,100,-1),COLORRED;大牛有形主图指标通达信的大牛有形主图指标FL:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1)),COLORWHITE;FS:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1),COLORWHITE;BB:IF(MA(CLOSE,17)<FS,FS,MA(CLOSE,17)),COLORWHITE;NX:=EMA(C,250);A:=BB-(EMA(C,3)-BB),COLORWHITE;DIFF:EMA((NX-(EMA(C,3)-NX)),5),LINETHICK2;IF(BB=FS,BB,BB), COLORWHITE,LINETHICK2;止损线: EMA(COST(81),10), COLORRED,LINETHICK2;牛熊线: EMA(COST(27),120), CIRCLEDOT;N:=150;判断高低:=3;高:=REF(HHV(H,N),判断高低);近期顶:REFDATE(高,DATE),COLORGREEN,LINETHICK3;最顶:=REFDATE(近期顶,DATE),NODRAW;出:=最顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;STICKLINE(出,C,O,3,0),COLORGREEN;STICKLINE(出,C,O,2,0),COLORGREEN;低:=REF(LLV(L,N),判断高低);近期底:REFDATE(低,DATE),COLORRED,LINETHICK3;最底:=REFDATE(近期底,DATE),NODRAW;进:=最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O)),NODRAW;STICKLINE(进,C,O,3,0),COLORRED;STICKLINE(进,C,O,2,0),COLORRED;通达信金字塔指标公式VAR1:=(HIGH+LOW)/2;AO:MA(VAR1,5)-MA(VAR1,34),LINETHICK0;STICKLINE(AO>=REF(AO,1),0,AO,0.1,1),COLORYELLOW;STICKLINE(AO<REF(AO,1),0,AO,0.1,1),COLORBLUE;{ 股旁网_最新股票指标公式}STICKLINE(AO>=REF(AO,1),(AO-AO*0.05),(AO-AO*0.15),5,-1) COLOR0000CC;STICKLINE(AO>=REF(AO,1),(AO-AO*0.2),(AO-AO*0.35),5,-1) COLOR0066FF;STICKLINE(AO>=REF(AO,1),(AO-AO*0.4),(AO-AO*0.55),5,-1) COLOR0099FF;STICKLINE(AO>=REF(AO,1),(AO-AO*0.6),(AO-AO*0.75),5,-1) COLOR00CCFF;STICKLINE(AO>=REF(AO,1),(AO-AO*0.8),(AO-AO*0.95),5,-1)COLOR00FFFF;STICKLINE(AO<REF(AO,1),(AO-AO*0.05),(AO-AO*0.15),5,-1) COLORFF3300;STICKLINE(AO<REF(AO,1),(AO-AO*0.2),(AO-AO*0.35),5,-1) COLORFF6600;STICKLINE(AO<REF(AO,1),(AO-AO*0.4),(AO-AO*0.55),5,-1) COLORFF9900;STICKLINE(AO<REF(AO,1),(AO-AO*0.6),(AO-AO*0.75),5,-1) COLORFFCC00;STICKLINE(AO<REF(AO,1),(AO-AO*0.8),(AO-AO*0.95),5,-1)COLORFFBB00;股。
通达信指标公式源码 支撑压力+加仓逃顶主图指标
N250:=250;PT250:=CONST(HHVBARS(V,N250));T250:IF(CURRBARSCOUNT<=N250,CONST(IF(PT250=0,C,REF(C,PT250))),DR AWNULL),COLOR990000,LINETHICK2;IF(CURRBARSCOUNT=PT250+1,T250*1.01,DRAWNULL),CIRCLEDOT,COLORY ELLOW,LINETHICK1;DRAWTEXT(CURRBARSCOUNT=N250,T250,'250'),COLOR990000;N120:=120;PT120:=CONST(HHVBARS(V,N120));T120:IF(CURRBARSCOUNT<=N120,CONST(IF(PT120=0,C,REF(C,PT120))),DR AWNULL),COLORAAAA00,LINETHICK2;IF(CURRBARSCOUNT=PT120+1,T120,DRAWNULL),CIRCLEDOT,COLORYELLO W,LINETHICK1;DRAWTEXT(CURRBARSCOUNT=N120,T120,'120'),COLORAAAA00;N60:=60;PT60:=CONST(HHVBARS(V,N60));T60:IF(CURRBARSCOUNT<=N60,CONST(IF(PT60=0,C,REF(C,PT60))),DRAWN ULL),COLOR00BB00,LINETHICK2;IF(CURRBARSCOUNT=PT60+1,T60,DRAWNULL),CIRCLEDOT,COLORYELLOW, LINETHICK1;DRAWTEXT(CURRBARSCOUNT=N60,T60,'60'),COLOR00BB00;N30:=30;PT30:=CONST(HHVBARS(V,N30));T30:IF(CURRBARSCOUNT<=N30,CONST(IF(PT30=0,C,REF(C,PT30))),DRAWN ULL),COLOR0000CC,LINETHICK2;IF(CURRBARSCOUNT=PT30+1,T30,DRAWNULL)CIRCLEDOT,COLORYELLOW,L INETHICK1;DRAWTEXT(CURRBARSCOUNT=N30,T30,'30'),COLOR0000CC;N20:=20;PT20:=CONST(HHVBARS(V,N20));T20:IF(CURRBARSCOUNT<=N20,CONST(IF(PT20=0,C,REF(C,PT20))),DRAWN ULL),COLORDD00DD,LINETHICK2;IF(CURRBARSCOUNT=PT20+1,T20,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;DRAWTEXT(CURRBARSCOUNT=N20,T20,'20'),COLORDD00DD;N10:=10;PT10:=CONST(HHVBARS(V,N10));T10:IF(CURRBARSCOUNT<=N10,CONST(IF(PT10=0,C,REF(C,PT10))),DRAWN ULL),COLOR00EEEE,LINETHICK2;IF(CURRBARSCOUNT=PT10+1,T10,DRAWNULL)CIRCLEDOT,COLORYELLOW,L INETHICK1;DRAWTEXT(CURRBARSCOUNT=N10,T10,'10'),COLOR00EEEE;N5:=5;PT5:=CONST(HHVBARS(V,N5));T5:IF(CURRBARSCOUNT<=N5,CONST(IF(PT5=0,C,REF(C,PT5))),DRAWNULL) ,COLORFFFFFF,LINETHICK2;IF(CURRBARSCOUNT=PT5+1,T5,DRAWNULL),CIRCLEDOT,COLORYELLOW,LI NETHICK1;DRAWTEXT(CURRBARSCOUNT=N5,T5,'5'),COLORFFFFFF;DRAWKLINE(H,O,L,C);VAR3:=(C+H+O+L)/4;买入:=XMA(VAR3,32)*(1-100/1000);低吸线:买入,COLORFF937F,LINETHICK2;卖出:=XMA(VAR3,20)*(1+80/1000);高抛线:卖出,COLORWHITE,LINETHICK2;{买:CROSS(买入,LOW),NODRAW;卖:CROSS(HIGH,卖出),NODRAW;}MA1:=MA(VAR3,3);DRAWICON(CROSS(买入,LOW),LOW*0.95,11);DRAWICON(CROSS(HIGH,卖出),HIGH*1.02,12);G:=5;AAB:=REF(H,G)=HHV(H,2*G+1); AAB1:=REF(L,G)=LLV(L,2*G+1);QYB:=BACKSET(AAB,G+1); QYB1:=BACKSET(AAB1,G+1);CCB:=FILTER(QYB,G) AND H=HHV(H,G+1); CCB1:=FILTER(QYB1,G) ANDL=LLV(L,G+1);DDDB:=BARSLAST(CCB); DDB1:=BARSLAST(CCB1);GDTSB:=IF(CCB,CURRBARSCOUNT,0);DDTSB:=IF(CCB1,CURRBARSCOUNT,0);DINGBUTSB:=IF(DDDB,REF(GDTSB,DDDB),GDTSB);DDTSB1:=IF(DDB1,REF(DDTSB,DDB1),DDTSB);GDCSB1:=CONST(DINGBUTSB); DDCSB1:=CONST(DDTSB1);GDCS13:=CONST(REF(HIGH,GDCSB1-1));DDCS13:=CONST(REF(L,DDCSB1-1));DINGBUTSB1:=REF(DINGBUTSB,DDDB+1); DDTSB2:=REF(DDTSB1,DDB1+1); GDCSB2:=CONST(DINGBUTSB1); DDCSB2:=CONST(DDTSB2);GDCS23:=CONST(REF(HIGH,DINGBUTSB1-1));DDCS23:=CONST(REF(L,DDTSB2-1));XG1:=BACKSET(ISLASTBAR,GDCSB1); XD1:=BACKSET(ISLASTBAR,DDCSB1); XG2:=BACKSET(ISLASTBAR,DINGBUTSB1);XD2:=BACKSET(ISLASTBAR,DDTSB2);XDD:=IF(DDCS13<=DDCS23,XD1,XD2);M:=INTPART(3*G/5);AAAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAAA,M+1);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0);DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);HH1:= REF(H,GDCSB1-1),NODRAW;HH2:= REF(H,GDCSB2-1),NODRAW;HH11:= REF(H,GDCS11-1),NODRAW;HH22:= REF(H,GDCS22-1),NODRAW;GHH1:=MAX(MAX(REF(H,GDCSB1-1),REF(H,GDCSB2-1)),MAX(REF(H,GDCS11 -1),REF(H,GDCS22-1))),NODRAW;DLL1:=MIN(MIN(REF(L,DDCSB1-1),REF(L,DDCSB2-1)),MIN(REF(L,DDCS11-1) ,REF(L,DDCS22-1))),NODRAW;GHH:=MAX(GHH1,HHV(H,10));DLL:=MIN(DLL1,LLV(L,10));DX1:=(REF(H,GDCSB1-1)-REF(H,GDCSB2-1))/(GDCSB2-GDCSB1),NODRAW; DX2:=(REF(H,GDCS11-1)-REF(H,GDCS22-1))/(GDCS22-GDCS11),NODRAW; GGAA:=DX1>0 AND(REF(H,(GDCSB1-1))+DX1*GDCSB1)>GHH*1.05,NODRAW;GGAB:=DX1<0 AND(REF(H,(GDCSB1-1))+DX1*GDCSB1)<DLL*0.95,NODRAW;DDX1:=IF(GGAA OR GGAB,0,1),NODRAW;GGBA:=DX2>0 AND(REF(H,(GDCS11-1))+DX2*GDCS11)>GHH*1.05,NODRAW;GGBB:=DX2<0 AND(REF(H,(GDCS11-1))+DX2*GDCS11)<DLL*0.95,NODRAW;DDDX1:=IF(GGBA OR GGBB,0,1),NODRAW;LX1:=(REF(L,DDCSB1-1)-REF(L,DDCSB2-1))/(DDCSB2-DDCSB1),NODRAW;LX2:=(REF(L,DDCS11-1)-REF(L,DDCS22-1))/(DDCS22-DDCS11),NODRAW; DDAA:=LX1<0 AND (REF(L,(DDCSB1-1))+LX1*DDCSB1)<DLL*0.95,NODRAW; DDAB:=LX1>0 AND (REF(L,(DDCSB1-1))+LX1*DDCSB1)>GHH*1.05,NODRAW; LLX1:=IF(DDAA OR DDAB,0,1);DDBA:=LX2<0 AND (REF(L,(DDCS11-1))+LX2*DDCS11)<DLL*0.95,NODRAW; DDBB:=LX2>0 AND (REF(L,(DDCS11-1))+LX2*DDCS11)>GHH*1.05,NODRAW; LLLX1:=IF(DDBA OR DDBB,0,1),NODRAW;高压力:DRAWLINE(CURRBARSCOUNT=GDCSB2,H,CURRBARSCOUNT=GDCSB1,H, DDX1),COLORABFF46,LINETHICK1;低支撑:DRAWLINE(CURRBARSCOUNT=DDCSB2,L,CURRBARSCOUNT=DDCSB1,L,L LX1),COLORABFF46,LINETHICK1;DRAWLINE(CURRBARSCOUNT=GDCS22 ,H,CURRBARSCOUNT=GDCS11,H,DD DX1),COLORRED,LINETHICK1;DRAWLINE(CURRBARSCOUNT=DDCS22 ,L,CURRBARSCOUNT=DDCS11,L,LLL X1),COLORRED,LINETHICK1;{涨停标注}STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);A1:=BARSLAST(REF(CROSS(DEA,DIFF),1));A2:=BARSLAST(REF(CROSS(DIFF,DEA),1));VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-2 0;HONGJU:=IF(VAR1>0,VAR1,0);GAOPAO:=CROSS(DIFF,DEA) AND HONGJU>=40;DRAWICON(GAOPAO,HIGH*1.01,6);DRAWTEXT(GAOPAO,HIGH*1.02,'顶背'),COLORGREEN;LLVV:=LLV(LOW,5);DIXI:=CROSS(DEA,DIFF) AND REF(DEA,A1+1)>0 AND DEA<0; DRAWICON(DIXI,LOW*0.90,38);DRAWTEXT(DIXI,LOW*0.90,'波段低吸'),COLORYELLOW;MA20:=MA(CLOSE,20);M0:=MA(CLOSE,5);M10:=MA(CLOSE,12);M1:=MA(CLOSE,20);M30:=MA(CLOSE,30);M2:=MA(CLOSE,60);M3:=MA(CLOSE,240);M4:=MA(CLOSE,120);M41:=MA(CLOSE,41);TJ2:=MA(CLOSE,3)<M2;VAR2:=(CLOSE*2+HIGH+LOW)/4;SK:=EMA(VAR2,13)-EMA(VAR2,73);SD:=EMA(SK,2);短线:=CROSS(SK,SD) AND SK<0.05 AND (VOL/MA(VOL,5)>2 ORCLOSE/REF(CLOSE,1)>0.035 AND CLOSE>EMA(CLOSE,17)); {STICKLINE(短线,HIGH,LOW,0.5,0),COLORFFFF00;STICKLINE(短线,OPEN,CLOSE,10,1),LINETHICK2,COLORFFFF00;}CY:=BARSLAST(短线);MACD双底:=REF(LOW,A2+1)<CLOSE AND CROSS(DIFF,DEA);介入:=COUNT(短线,4)=1 AND COUNT(MACD双底,1)=1 ANDCLOSE/MA(CLOSE,56)*1000>980 AND CLOSE>OPEN AND VOL>=MA(VOL,5) AND DIFF>=-0.1;DRAWTEXT(介入,LOW*0.92,'起涨点'),COLORRED;DRAWICON(介入,LOW*0.92,1);反向顶背:=REF(CLOSE,A2+1)>CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);逃顶:=CROSS(SD,SK) AND SK>0.2 AND VOL/MA(VOL,5)<2;逃顶成立:=COUNT(逃顶,4)=1 AND COUNT(反向顶背,1)=1;DRAWICON(逃顶成立,HIGH*1.01,15);DRAWTEXT(逃顶成立,HIGH*1.01,'逃顶'),COLORGREEN;N1G:=CLOSE/REF(CLOSE,1)>=1.097 AND HIGH=CLOSE ANDNOT(OPEN=HIGH);A1G:=BARSLAST(N1G);A2G:=LLV(LOW,A1G-1)>REF(LOW,A1G) AND CLOSE/REF(OPEN,A1G)>1 AND CLOSE/REF(OPEN,A1G)<=1.04;XGGG:=FILTER(A2G,3) AND A1G>=4 AND A1G<=20;DRAWICON(XGGG,LOW*0.96,41);DRAWTEXT(XGGG,LOW*0.96,'涨停秘笈'),COLORYELLOW;XPP1:=CROSS(DEA,DIFF) AND CLOSE>MA20 AND MA20>REF(MA20,1) AND DIFF>REF(DIFF,A2+1);DRAWICON(XPP1,LOW*0.96,3);DRAWTEXT(XPP1,LOW*0.96,'强势洗盘'),COLORWHITE;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),COLORWHITE; DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLORA6E500;VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);VAR2222:=CROSS(VAR1111,0.9);VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);VAR4444:=CROSS(VAR3333,0.9);压力:= REF(HIGH,BARSLAST(VAR2222));STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH,BARSLAST(VA R2222)),0.5,1),COLOREA91B5,LINETHICK3;支撑3:= REF(LOW,BARSLAST(VAR4444));STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW,BARSLAST(VAR 4444)),0.5,1),COLOR00B4FF,LINETHICK3;PH:=TROUGHBARS(2,5,1);LL:=HHV(H,PH);TJ1:=LL=HIGH AND LL<REF(LL,1);{//=1}支撑:IF(BARSLAST(TJ1),REF(LOW,BARSLAST(TJ1)),DRAWNULL),COLORFF55BB;DRAWTEXT(ISLASTBAR,支撑,'支撑'),COLORFF55BB;多:=EMA(C,3);空:=EMA(C,5);均衡:=EMA(空,5);VARF1:=COUNT(CROSS(多,均衡),2)=1;VARF2:=COUNT(CROSS(空,均衡),2)=1;ZAI:=FILTER(VARF1 AND VARF2,2);DRAWTEXT(ZAI,均衡,'主升↑'),COLORYELLOW;。
支撑压力-通达信指标
N1:=20;N2:=10;N3:=5;AA:=REF(H,N1)=HHV(H,2*N1+1);QY:=BACKSET(AA,N1+1);CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR005 5FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYEL LOW,POINTDOT,LINETHICK2;}AA1:=REF(L,N1)=LLV(L,2*N1+1);QY1:=BACKSET(AA1,N1+1);CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);{DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055 FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORYELL OW,POINTDOT,LINETHICK2;}LAA:=REF(H,N2)=HHV(H,2*N2+1);LQY:=BACKSET(LAA,N2+1);LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);LDDD:=BARSLAST(LCC);LGDTS:=IF(LCC,CURRBARSCOUNT,0);LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);LDINGBU1:=REF(LDINGBU,LDDD+1);LGDCS1:=CONST(LDINGBUTS);LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);LGDCS2:=CONST(LDINGBUTS1);LDINGBU2:=REF(LDINGBU1,LDDD+1);LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1),COLOR0 055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),COLORY ELLOW,POINTDOT;}LAA1:=REF(L,N2)=LLV(L,2*N2+1);LQY1:=BACKSET(LAA1,N2+1);LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);LDD1:=BARSLAST(LCC1);LDDTS:=IF(LCC1,CURRBARSCOUNT,0);L YDB:=IF(LDD1,REF(L,LDD1),L);LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);LDDCS1:=CONST(LDDTS1);LZDB:=REF(L YDB,LDD1+1);LDDTS2:=REF(LDDTS1,DD1+1);LDDCS2:=CONST(LDDTS2);DDYL2:=DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE;DDZC2:=DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE;ZGSTAR:=(DDYL2+DDZC2)/2;ZGEND:=CONST((DDYL2+DDZC2)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);LLAA:=REF(H,N3)=HHV(H,2*N3+1);LLQY:=BACKSET(LLAA,N3+1);LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);LLDDD:=BARSLAST(LLCC);LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);LLDINGBU1:=REF(LLDINGBU,LLDDD+1);LLGDCS1:=CONST(LLDINGBUTS);LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);LLGDCS2:=CONST(LLDINGBUTS1);LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1),COLO R0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1),COLO RYELLOW,POINTDOT;}LLAA1:=REF(L,N3)=LLV(L,2*N3+1);LLQY1:=BACKSET(LLAA1,N3+1);LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);LLDD1:=BARSLAST(LCC1);LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);LL YDB:=IF(LLDD1,REF(L,LLDD1),L);LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);LLDDCS1:=CONST(LLDDTS1);LLZDB:=REF(LLYDB,LLDD1+1);LLDDTS2:=REF(LLDDTS1,DD1+1);LLDDCS2:=CONST(LLDDTS2);GDYL3:=DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H ,1) COLORYELLOW;DDZC3:=DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L, 1) COLORYELLOW;LZGSTAR:=(GDYL3+DDZC3)/2;LZGEND:=CONST((GDYL3+DDZC3)/2);LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);GDYL1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED;DDZC1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED;长线压力:DDZC1+(GDYL1-DDZC1)*0.809,COLORRED;长线支撑:DDZC1+(GDYL1-DDZC1)*0.191,COLORRED;中线压力:DDZC2+(DDYL2-DDZC2)*0.809,COLORGREEN;中线支撑:DDZC2+(DDYL2-DDZC2)*0.191,COLORGREEN;短线压力:DDZC3+(GDYL3-DDZC3)*0.809,COLORBLUE;短线支撑:DDZC3+(GDYL3-DDZC3)*0.191,COLORBLUE;L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1),COL ORYELLOW;中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLOR WHITE;长GDYL:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED,POINTDOT;长DDZC:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,POINTDOT;中DDYL:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE,POINTDOT;中DDZC:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE,POINTDOT;短GDYL:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW,POINTDOT;短DDZC:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW,POINTDOT;。
通达信公式支撑压力自动画线指标
通达信公式支撑压力自动画线指标这个指标非常好用,能自动画线。
非常难找到这么干净清爽的自动画线指标,某些软件有自动画线功能一年都要收费2万多。
注意参数设置{ N:1,100,60 P:0,1,0}{ N:1,100,8 P:0,1,0}ZGD:=HHV(H,60);ZGD2:=CONST(ZGD);ZDD:=LLV(L,60);ZDD2:=CONST(ZDD);GJ:=(C+H+L+O)/4;明日阻力:=L+(GJ-L)+(C-L);明日支撑:=L+(C-GJ);KOH:=L>REF(H,1);KOL:=H<REF(L,1);HIF:=L>REF(H,BARSLAST(KOH)+1);NHIF:=L<=REF(H,BARSLAST(KOH)+1);LIF:=H<REF(L,BARSLAST(KOL)+1);NLIF:=H>=REF(L,BARSLAST(KOL)+1);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D 24,DDDDD)))),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;AA:=REF(H,N)=HHV(H,2*N+1);AA1:=REF(L,N)=LLV(L,2*N+1);QY:=BACKSET(AA,N+1); QY1:=BACKSET(AA1,N+1);CC:=FILTER(QY,N) AND H=HHV(H,N+1); CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);DDD:=BARSLAST(CC); DD1:=BARSLAST(CC1);GDTS:=IF(CC,CURRBARSCOUNT,0);DDTS:=IF(CC1,CURRBARSCOUNT,0);DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);GDCS1:=CONST(DINGBUTS); DDCS1:=CONST(DDTS1);GDCS13:=CONST(REF(HIGH,GDCS1-1));DDCS13:=CONST(REF(L,DDCS1-1));DINGBUTS1:=REF(DINGBUTS,DDD+1);DDTS2:=REF(DDTS1,DD1+1);GDCS2:=CONST(DINGBUTS1); DDCS2:=CONST(DDTS2);GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));DDCS23:=CONST(REF(L,DDTS2-1));XG1:=BACKSET(ISLASTBAR,GDCS1);XD1:=BACKSET(ISLASTBAR,DDCS1);XG2:=BACKSET(ISLASTBAR,DINGBUTS1);XD2:=BACKSET(ISLASTBAR,DDTS2);XDD:=IF(DDCS13<=DDCS23,XD1,XD2);BCG:=SUM(XG1,0); BCD:=SUM(XDD,0);今日阻力:REF(明日阻力 , 1),NODRAW;今日支撑:REF(明日支撑 , 1),NODRAW;压力位:IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:IF(ISLASTBAR,底部,DRAWNULL),NODRAW;高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT= GDCS1,H,1) ,COLORGREEN,LINETHICK2;低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT= DDCS1,L,1),COLORBLUE,LINETHICK2;高:=CONST(MAX(MAX(MAX(ZGD2,高点压力),GDCS13),GDCS23));低:=CONST(MIN(MIN(MIN(ZDD2,DDCS23),DDCS13),低点支撑));ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR, ZGEND,1),COLOR555555,LINETHICK2;M:=INTPART(3*N/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAA,M+1);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0);DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);上缺口:=P=0 AND HIF AND BARSLAST(KOH)<BARSLAST(NHIF)AND BARSLAST(HIF)<BARSLAST(NHIF);HG:=IF(上缺口,REF(H,BARSLAST(KOH)+1),DRAWNULL);STICKLINE(上缺口,HG,HG*1.001,10,0),COLOR888888;下缺口:=P=0 AND LIF AND BARSLAST(KOL)<BARSLAST(NLIF) AND BARSLAST(LIF)<BARSLAST(NLIF);LG:=IF(下缺口,REF(L,BARSLAST(KOL)+1),DRAWNULL);STICKLINE(下缺口,LG,LG*0.999,10,0),COLOR888888;高点压力M:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT =GDCS11,H,1),COLORRED,LINETHICK1;AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);低点支撑M:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT =DDCS11,L,1) COLORRED,LINETHICK1;STICKLINE(XG2,GDCS23,GDCS23,0.5,1),COLORWHITE;STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORYELLOW;STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA;STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF;STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00;STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF;STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;STICKLINE(ISLASTBAR ,压力位,压力位,120,0),COLORFFFFFF;STICKLINE(ISLASTBAR ,底部位,底部位,100,0),COLOR00FF00;。
支持压力 通达信指标公式源码
支持压力通达信指标公式源码该文档提供了一个支持压力指标的通达信指标公式源码。
该指标可以帮助分析师和交易员评估市场上的支撑和阻力水平。
1. 指标介绍支持压力指标是一种技术分析工具,用于衡量证券价格在上升或下降过程中所经历的支撑和阻力水平。
该指标基于斐波那契数列和黄金比例原理,通过计算得出市场上的关键支撑和阻力位点。
2. 通达信指标公式源码下面是一个示例通达信指标公式源码,用于计算支持压力指标:公式名称:支持压力指标英文名称:SupportResistance变量:L, H - K线数据中的最低价和最高价变量:N - 周期数值公式:`A:=(H-L)*0.618+L;B:=(H-L)*0.5+L;C:=(H-L)*0.382+L;D:=(H-L)*0.236+L;E:=(H-L)*0.786+L;F:=(H-L)*1.618+L;SSQ:=MA((H-L)^2, N);BSQ:=MA(((A-L)^2+(B-L)^2+(C-L)^2+(D-L)^2+(E-L)^2+(F-L)^2)/6, N);SQR:=MA((L-H)^2, N);FSQ:=MA(((H-F)^2+(H-E)^2+(H-D)^2+(H-C)^2+(H-B)^2+(H-A)^2)/6, N);SupportResistance: (SSQ+BSQ)/(SQR+FSQ)*100;`返回值:返回计算得出的支持压力指标数值。
数值越高表示阻力越大,数值越低表示支撑越强。
3. 如何使用指标使用该指标可以通过计算得出市场上的关键支撑和阻力位点,并作为交易决策的参考指标。
支撑位通常被认为是价格下跌的阻力水平,而阻力位则是价格上涨的阻力水平。
可以将该指标应用于股票、期货、外汇等市场,在日内交易或长期投资中提供技术分析的参考。
4. 注意事项- 该指标仅为技术分析工具,使用时应结合其他分析方法,综合判断市场走势。
- 该示例通达信指标公式源码仅供参考,实际使用时可能需要根据个人的技术需求进行适当的调整和修改。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
N1:=20;N2:=10;N3:=5;AA:=REF(H,N1)=HHV(H,2*N1+1);QY:=BACKSET(AA,N1+1);CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR005 5FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYEL LOW,POINTDOT,LINETHICK2;}AA1:=REF(L,N1)=LLV(L,2*N1+1);QY1:=BACKSET(AA1,N1+1);CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);{DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLOR0055 FF,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORYELL OW,POINTDOT,LINETHICK2;}LAA:=REF(H,N2)=HHV(H,2*N2+1);LQY:=BACKSET(LAA,N2+1);LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);LDDD:=BARSLAST(LCC);LGDTS:=IF(LCC,CURRBARSCOUNT,0);LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);LDINGBU1:=REF(LDINGBU,LDDD+1);LGDCS1:=CONST(LDINGBUTS);LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);LGDCS2:=CONST(LDINGBUTS1);LDINGBU2:=REF(LDINGBU1,LDDD+1);LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H,LGDCS2-1),1),COLOR0 055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H,LGDCS1-1),1),COLORY ELLOW,POINTDOT;}LAA1:=REF(L,N2)=LLV(L,2*N2+1);LQY1:=BACKSET(LAA1,N2+1);LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);LDD1:=BARSLAST(LCC1);LDDTS:=IF(LCC1,CURRBARSCOUNT,0);L YDB:=IF(LDD1,REF(L,LDD1),L);LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);LDDCS1:=CONST(LDDTS1);LZDB:=REF(L YDB,LDD1+1);LDDTS2:=REF(LDDTS1,DD1+1);LDDCS2:=CONST(LDDTS2);DDYL2:=DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE;DDZC2:=DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE;ZGSTAR:=(DDYL2+DDZC2)/2;ZGEND:=CONST((DDYL2+DDZC2)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);LLAA:=REF(H,N3)=HHV(H,2*N3+1);LLQY:=BACKSET(LLAA,N3+1);LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);LLDDD:=BARSLAST(LLCC);LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);LLDINGBU1:=REF(LLDINGBU,LLDDD+1);LLGDCS1:=CONST(LLDINGBUTS);LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);LLGDCS2:=CONST(LLDINGBUTS1);LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);{DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF(H,LLGDCS2-1),1),COLO R0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF(H,LLGDCS1-1),1),COLO RYELLOW,POINTDOT;}LLAA1:=REF(L,N3)=LLV(L,2*N3+1);LLQY1:=BACKSET(LLAA1,N3+1);LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);LLDD1:=BARSLAST(LCC1);LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);LL YDB:=IF(LLDD1,REF(L,LLDD1),L);LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);LLDDCS1:=CONST(LLDDTS1);LLZDB:=REF(LLYDB,LLDD1+1);LLDDTS2:=REF(LLDDTS1,DD1+1);LLDDCS2:=CONST(LLDDTS2);GDYL3:=DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H ,1) COLORYELLOW;DDZC3:=DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L, 1) COLORYELLOW;LZGSTAR:=(GDYL3+DDZC3)/2;LZGEND:=CONST((GDYL3+DDZC3)/2);LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);GDYL1:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED;DDZC1:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED;长线压力:DDZC1+(GDYL1-DDZC1)*0.809,COLORRED;长线支撑:DDZC1+(GDYL1-DDZC1)*0.191,COLORRED;中线压力:DDZC2+(DDYL2-DDZC2)*0.809,COLORGREEN;中线支撑:DDZC2+(DDYL2-DDZC2)*0.191,COLORGREEN;短线压力:DDZC3+(GDYL3-DDZC3)*0.809,COLORBLUE;短线支撑:DDZC3+(GDYL3-DDZC3)*0.191,COLORBLUE;L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBAR,LZGEND,1),COL ORYELLOW;中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLOR WHITE;长GDYL:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORRED,POINTDOT;长DDZC:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,POINTDOT;中DDYL:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT=LGDCS1,H,1) COLORWHITE,POINTDOT;中DDZC:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT=LDDCS1,L,1) COLORWHITE,POINTDOT;短GDYL:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUNT=LLGDCS1,H,1) COLORYELLOW,POINTDOT;短DDZC:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT=LLDDCS1,L,1) COLORYELLOW,POINTDOT;。