通达信指标——压力支撑(主图)
常用技术指标之压力支撑指标
常用技术指标之压力支撑指标压力支撑指标(Support and Resistance Indicator)是技术分析中常用的一种指标,用于判断价格在未来走势中可能遇到的压力位和支撑位。
压力位指的是在价格上升过程中,由于供应量增加或买盘减少而导致价格停止上涨的点位。
在这一点位上,卖盘压力大于买盘,市场情绪较为悲观。
当价格接近压力位时,交易者可能会决定卖出,从而形成价格的阻力。
一旦价格无法突破压力位,可能会出现价格回撤或重新调整的趋势。
支撑位指的是在价格下跌过程中,由于需求量增加或卖盘减少而导致价格停止下跌的点位。
在这一点位上,买盘压力大于卖盘,市场情绪较为乐观。
当价格接近支撑位时,交易者可能会决定买入,从而形成价格的支撑。
一旦价格无法突破支撑位,可能会出现价格的反弹或上涨的趋势。
压力支撑指标的计算方法通常基于过去一段时间内的价格数据。
常用的压力支撑指标包括移动平均线、斐波那契回调、布林带、和支撑线等。
移动平均线(Moving Average)经常被用于寻找压力支撑位。
简单移动平均线(Simple Moving Average)和指数移动平均线(Exponential Moving Average)可以平滑价格波动,帮助交易者确定趋势的方向和力度。
当价格从下方突破移动平均线时,可能会出现上涨趋势;当价格从上方突破移动平均线时,可能会出现下跌趋势。
移动平均线也可以作为支撑位和压力位的参考线。
斐波那契回调(Fibonacci Retracement)是一种基于斐波那契数列的技术指标。
斐波那契回调根据价格的波动范围,将价格的回撤或调整分为多个比例,其中的38.2%、50%和61.8%是常用的斐波那契回撤位。
当价格回撤到这些位级时,可能会形成支撑位或压力位。
布林带(Bollinger Bands)由三条曲线组成,中间的是简单移动平均线,上下两条则是移动平均线的标准差。
布林带可以显示价格的震荡范围,并根据价格的波动情况,提供压力位和支撑位的参考。
【通达信指标】重心、压力、支撑主图指标公式
【通达信指标】重⼼、压⼒、⽀撑主图指标公式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),'该股缩量下跌,⾛势偏弱,离场观望。
通达信支撑压力主图
BP1:=MA(C,1);
BP2:=SMA(SMA(SMA(BP1,2,1),2,1),2,1);
SMA2:=MA(BP2,3);
停损下限:=IF(LLV(MA(BP2,8),3)<BP2,LLV(MA(BP2,8),3),BP2);
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1<E2)); H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MMM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高压:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,DOTLINE;
AA:=((CLOSE/REF(CLOSE,1))>=1.099);
AB:=(VOL/REF(VOL,1));
关注:=IF((((CLOSE/REF(CLOSE,1))>=1.07) AND (AB<1)),1,0),LINETHICK0,NODRAW;
通达信支撑与压力的神级主图指标公式
通达信支撑与压力的神级主图指标公式局部低点预选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;。
压力支撑线指标公式(通达信)
压力支撑线指标公式(通达信)压力支撑线指标(Pressure Support Line)是一种技术分析工具,用于帮助投资者识别股票价格在上升或下跌时的可能的压力和支撑水平。
其主要思想是通过一系列数学公式来计算出当前价格的压力和支撑水平,从而为投资者提供买入或卖出的参考。
通达信是一个提供股票技术分析工具的软件,其中包括了压力支撑线指标的计算公式。
下面将详细介绍通达信中压力支撑线指标的计算公式和使用方法。
压力线=当日最高价+ATR*参数支撑线=当日最低价-ATR*参数其中,ATR(Average True Range)是一个波动性指标,用于测量市场的波动性。
它的计算公式如下:TR=MAX(H-L,H-Cp,Cp-L)ATR=SMA(TR,N)其中,H是当日最高价,L是当日最低价,Cp是前一日的收盘价,MAX是选择最大值的函数,SMA是简单移动平均线,N是计算的周期。
1.在通达信软件中,选择一个股票并打开K线图。
2.在菜单中选择“技术分析”-“波动率指标”,然后选择“压力支撑线”。
3.设置压力支撑线指标的参数,点击确定。
4.在K线图上,会显示出压力线和支撑线的曲线,与股票价格进行比较。
5.如果股票价格上涨并且接近压力线时,投资者可以考虑卖出。
6.如果股票价格下跌并且接近支撑线时,投资者可以考虑买入。
需要注意的是,压力支撑线指标只是一种参考工具,不能单独作为买卖的依据。
投资者还需要结合其他技术分析工具和市场的实际情况来做出决策。
总结起来,压力支撑线指标是一种通过计算股票价格的压力和支撑水平的技术分析工具,可以帮助投资者做出买卖决策。
通达信是一个提供该指标计算和使用的股票技术分析软件,并提供了相关的计算公式和使用方法。
投资者可以根据自己的需求来设定参数,并结合其他技术分析工具和市场情况来使用该指标。
通达信指标公式源码 底部支撑决策 主图源码
STICKLINE((HIGH-REF(C,1))/REF(C,1)*100>=1.1,MIN(OPEN,REF(CLOSE,1)),CLOSE,3.5,0),COLORWHITE;
STICKLINE((HIGH-REF(C,1))/REF(C,1)*100>=1.1,MIN(OPEN,REF(CLOSE,1)),HIGH,0.001,0),COLORWHITE;
STICKLINE((HIGH-REF(C,1))/REF(C,1)*100>=2.1,MIN(OPEN,REF(CLOSE,1)),CLOSE,3.5,0), COLORRED;
STICKLINE((HIGH-REF(C,1))/REF(C,1)*100>=2.1,MIN(OPEN,REF(CLOSE,1)),HIGH,0.001,0), COLORRED;
LJL:=FILTER(TJ1பைடு நூலகம்5);
TJ2:=IF(BARSLAST(LJL)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(LJL)=2 AND
CLOSE>REF(HIGH,2),1,IF(BARSLAST(LJL)=3 AND CLOSE>REF(HIGH,3),1,0)));
JJ:=(3*C+H+L+O)/6;
VAR1:=(8*JJ+7*REF(JJ,1)+6*REF(JJ,2)+5*REF(JJ,3)+4*REF(JJ,4)+3*REF(JJ,5)+2*REF(JJ,6)+REF(JJ,8))/36;
压力支撑线指标公式(通达信)
压力支撑线指标公式(通达信)展开全文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;股。
通达信 压力位和支撑位指标
通达信压力位和支撑位指标
通达信压力位和支撑位指标是技术分析中常用的指标之一,用于预测股价走势。
压力位是指股价上涨到一定程度后,遇到下行压力的位置,价格停止涨幅的位置。
通
达信压力位指标通常通过计算历史数据中的最高价和最低价,确认当前股价可能到达的压
力位。
1. 计算方法:通达信压力位和支撑位指标的计算方法基于历史数据。
支撑位指标的
计算方法是从最高价开始,由下往上逐一确定最低价。
压力位的指标计算方法是相反的,
从最低价开始,由上往下逐一确定最高价。
在指标的参数设置中,通常设置包括计算周期
和最近的几个交易日等。
2. 显示方式:压力位和支撑位指标的显示方式是通过直线和点来表示。
支撑线一般
画在股价图下方,长为数条K线,标注自下而上的最低价。
压力位就反之,画在线的上方,标注自上而下的最高价。
点位显示一般位于支撑或压力线的交汇点或最高/最低点上。
3. 使用方法:在股市交易中使用压力位和支撑位指标的方法有多种,具体取决于交
易者的风险偏好和交易策略。
一般而言,如果股价上行,支撑线是止损点,而压力线则是
卖出点,它们都是交易者选定的止损线和盈利点。
如果股价下行,那么支撑线就是最佳买
入点,而压力线则表示卖出时的机会。
小结:
通达信压力位和支撑位指标是预测股价行情的重要技术指标,用于帮助交易者选择买
入和卖出的时机,并设定止损点和盈利点。
他们的计算方法基于历史数据,通过直线和点
的方式表示,在交易中的使用方法也根据股价上涨和下跌来确定其具体含义。
通达信指标公式源码压力支撑主图
{通达信干净清爽153压力支撑主图指标公式}N:=8;P:=1;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(D24,DDDDD)))),COLORF FFFFF;底部:=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) ,COLORGRE EN,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),COLOR55555 5,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),COLORRE D,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;。
通达信指标公式源码 几何压力支撑
源码:{几何压力支撑,p:2,4,3}N:=POW(2,P);FF:=CONST(REF(C,1));AA:=IF((FF < 100),FF,(FF / 100));A:=INTPART(((N * (LOG(AA) / LOG(2))) + 1));Y1:=(A/N);Y2:=((A+1 ) / N);Y3:=((A+2 ) / N);Z1:=((A-1) / N);{第一个支撑}Z2:=((A-2) / N);Z3:=((A-3) / N);ZC1:=IF((FF > 100),(POW(2,Z1) * 100),POW(2,Z1));ZC2:=IF((FF > 100),(POW(2,Z2) * 100),POW(2,Z2));ZC3:=IF((FF > 100),(POW(2,Z3) * 100),POW(2,Z3));YL1:=IF((FF > 100),(POW(2,Y1) * 100),POW(2,Y1));YL2:=IF((FF > 100),(POW(2,Y2) * 100),POW(2,Y2));YL3:=IF((FF > 100),(POW(2,Y3) * 100),POW(2,Y3));支撑一:IF(CURRBARSCOUNT<=50,ZC1,DRAWNULL),COLOR00F24F;支撑二:IF(CURRBARSCOUNT<=50,ZC2,DRAWNULL),COLORWHITE,POINTDOT; {支撑三:IF(CURRBARSCOUNT<=50,ZC3,DRAWNULL),COLORWHITE,POINTDOT;} 压力一:IF(CURRBARSCOUNT<=50,YL1,DRAWNULL),COLOR05DDFC;压力二:IF(CURRBARSCOUNT<=50,YL2,DRAWNULL),COLORWHITE,POINTDOT; {压力三:IF(CURRBARSCOUNT<=50,YL3,DRAWNULL),COLORWHITE,POINTDOT;} 均价线:=AMOUNT/V/100;C2:=REF(C,1);涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;STICKLINE(涨停,H,L,0,0),COLORYELLOW;支撑线:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; LC:=REF(CLOSE,1);操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100;趋势线:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;震仓线:=45;震仓线2:=50;逃命线:=80;抄底线:=20;绝底线:=5;PP2:=操作线<震仓线2 AND REF(操作线,1)>震仓线2 ;PP:=操作线<震仓线AND REF(操作线,1)>震仓线;PP3:=操作线<抄底线AND REF(操作线,1)>抄底线;HH:=COUNT(涨停,13)>=1;STICKLINE(PP2 AND HH,OPEN,CLOSE,0.8,0),COLORBLUE;STICKLINE(PP AND HH,OPEN,CLOSE,0.8,0),COLORBLUE;STICKLINE(PP3 AND HH,OPEN,CLOSE,0.8,0),COLORBLUE;A8:=SMA(L,4,3) ;STICKLINE(A8 AND REF(PP,1) AND HH ,A8*0.9999,A8*0.9979,5,0);DRAWICON(A8 AND REF(PP,1) AND HH,L*0.98,1);STICKLINE(A8 AND REF(PP3,1) AND HH ,A8*0.9999,A8*0.9979,5,0);DRAWICON(A8 AND REF(PP3,1) AND HH,L*0.98,1);HD:=COUNT(涨停,21)>=1;A1:=SMA(H,4,3);STICKLINE(A1 AND HD ,A1,A1*1.001,0.3,0);ZT:=C/REF(C,1)>1.097;DRAWTEXT(ZT,L*0.98,'涨停'),COLORGRAY;VARZT:=BARSLAST(C/REF(C,1)>1.097);STICKLINE(VARZT=2,L*0.97,L*0.98,3.5,0),COLOR0000FF;DRAWTEXT(VARZT=2,L*0.95,'3'),COLORYELLOW;STICKLINE(VARZT=4,H*1.03,H*1.02,3.5,0),COLOR9966FF;DRAWTEXT(VARZT=4,H*1.06,'5'),COLORYELLOW;STICKLINE(VARZT=7,L*0.97,L*0.98,3.5,0),COLOR00FFFF;DRAWTEXT(VARZT=7,L*0.95,'8'),COLORYELLOW;STICKLINE(VARZT=12,H*1.03,H*1.02,3.5,0),COLORFF33FF;DRAWTEXT(VARZT=12,H*1.06,'13'),COLORYELLOW;西:=EMA(HHV(HIGH,1),8);电:=EMA(CLOSE,8);进:=((电< REF(电,1)) AND (CLOSE < 电));出:=IF(((西< REF(西,1)) OR 进),1,0);出击:=((((COUNT((出= 1),4) = 3) AND (出= 0)) AND (((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) > 0.085)) * 89);DRAWICON((出击>=89),L*0.97,1);DRAWTEXT((出击>=89),L*0.97,'出击'),COLORYELLOW;STICKLINE((出击>=89),H,L,4,0),LINETHICK1,COLORRED;STICKLINE((出击>=89),H,L,0.2,0),COLORYELLOW;STICKLINE((出击>=89),O,C,2,0),LINETHICK1,COLORYELLOW;DRAWICON((出击>=89),(H+L)/2,7);。
通达信指标公式源码 压力 支撑 +买卖点
VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14)))); VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) - LLV(LOW,14)))); VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34)); DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW - (LOW*0.02)),1);DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.02)),2);DIR2:=ABS(CLOSE-REF(CLOSE,10));VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);ER2:=DIR2/VIR2;CS2:=ER2*(0.8-2/24)+2/24;CQ2:=CS2*CS2;AMA2:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;AMA3:IF(AMA2/REF(AMA2,1)>0.997,AMA2,DRAWNULL),COLORYELLOW,LINETHICK2; AMA4:IF(AMA2/REF(AMA2,1)>1.001,AMA2,DRAWNULL),COLORRED,LINETHICK2;PT:=REF(H,1)-REF(L,1);CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;AH:=CDP+PT;AL:=CDP-PT;NH:=CDP*2-REF(L,1);NL:=CDP*2-REF(H,1);强:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORCYAN;M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);撑:IF(NL<M,CDP-(CDP-M)*0.618,NL)NODRAW;底:IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW;STICKLINE(((OPEN < CLOSE) AND (VAR2 < MA(VAR3,6))),(CLOSE * 0.998),(OPEN * 1.002),2,0),COLORRED;A1:=EMA(C,14)COLORWHITE,LINETHICK1;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;突破:REF(EMA(C,14),1),NODRAW;距离:(C-突破)/突破*100,NODRAW;出击:IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1),DRAWNULL)COLORRED,LI NETHICK2;休假:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL)COLORGREEN,LI NETHICK2;涨幅:IF(A1X>=0,(C-出击)/出击*100,DRAWNULL)NODRAW;跌幅:IF(A1X<0,(C-休假)/休假*100,DRAWNULL)NODRAW;♂10%:IF(H>=出击*1.1,出击*1.1,DRAWNULL),COLORRED,POINTDOT;♂20%:IF(H>=出击*1.2,出击*1.2,DRAWNULL),COLORRED,POINTDOT;♂30%:IF(H>=出击*1.3,出击*1.3,DRAWNULL),COLORRED,POINTDOT;♀Ⅰ:IF(L<休假*0.9,休假*0.9,DRAWNULL),COLORGREEN,POINTDOT;♀Ⅱ:IF(L<休假*0.8,休假*0.8,DRAWNULL),COLORGREEN,POINTDOT;♀Ⅲ:IF(L<休假*0.7,休假*0.7,DRAWNULL),COLORGREEN,POINTDOT;STICKLINE(CROSS(A1X,0),C,O,2,0)COLORYELLOW;STICKLINE(CROSS(0,A1X),C,O,2,0)COLORGREEN;STICKLINE(CROSS(A1X,0)ORCROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,2,0)COLORWHITE;。
通达信公式支撑压力自动画线指标
通达信公式支撑压力自动画线指标这个指标非常好用,能自动画线。
非常难找到这么干净清爽的自动画线指标,某些软件有自动画线功能一年都要收费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. 确定买入和卖出时机。
当股票价格触及支撑线时,投资者可以选择买入股票,以预期股票价格的反弹;而当股票价格触及压力线时,投资者可以选择卖出股票,以预期股票价格的回落。
通过绘制支撑压力线,可以帮助投资者确定买入和卖出的时机,提高投资的成功率。
3. 确定止损和止盈位。
在股票交易中,止损和止盈是非常重要的策略。
通达信支撑压力线指标可以帮助投资者确定止损和止盈的位点。
当股票价格跌破支撑线时,投资者可以选择止损,以避免进一步的损失;而当股票价格突破压力线时,投资者可以选择止盈,以保护已经获利的部分。
通达信多空压力线源码主图指标
通达信多空压力线源码主图指标以下是通达信多空压力线源码主图指标(无源码的请下载附件导入)源码HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;Z GDISPLAY:=0;MADISPLAY:=0;AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AA,HIGHN+1);CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);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,CURRBARSCOUNT= GDCS1,H,1) COLORGREEN,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H, GDCS2-1),1),COLOR0055FF,POINTDOT;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H, GDCS1-1),1),COLORYELLOW,POINTDOT;AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);DRAWICON(CC1,L*0.98,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,CURRBARSCOUNT= DDCS1,L,1) COLORRED,LINETHICK2;ZGSTAR:=(高点压力+低点支撑)/2;ZGEND:=CONST((高点压力+低点支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR, ZGEND,1),COLORFF55BB,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,D DCS1-1),1),COLORMAGENTA,POINTDOT,;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,D DCS2-1),1),COLORCYAN,POINTDOT;EMA13:=EMA(C,13),COLORWHITE;EMA21:=EMA(C,21),COLORYELLOW;EMA34:=EMA(C,34),COLORFF00FF;EMA60:=MA(C,60),COLORFFCC66;VAR2:=(2*CLOSE+HIGH+LOW)/4;VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED;DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN;DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);VAR9:=CLOSE-REF(CLOSE,5);VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20 );卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);DRAWICON(卖出<0,H+0.05,2); 买线:=EMA(CLOSE,2);卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LIN ETHICK3,COLORYELLOW;VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLO RGREEN;A0:=(L+H+C*2)/4;A1:EMA(A0,14)COLORBLUE,LINETHICK2;A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1 X,0))),DRAWNULL),COLORMAGENTA{,LINETHICK2};逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A 1X))),DRAWNULL),COLORCYAN,{LINETHICK2};买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK3;卖出空仓:IF(A1X<0 AND A2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK3;STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;。
通达信A压力支撑主图源码
通达信A压力支撑主图源码以下是通达信A压力支撑主图源码(无源码的请下载附件导入){ 参数: K=0--5, N1=5, N=10, P1=6}DRAWGBK(K!=5,RGB(0,0,255),RGB(30,50,55),0,' ',0);JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));短买春:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRAW;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股 OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望 OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3.5,0),COLORFF00FF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3.5,0),COLORBBBBBB;高点:=CONST(HHV(H,90)),NODRAW;低点:=CONST(LLV(L,90)),NODRAW;F:EMA(C,5);KS:=IF(BARSCOUNT(C)=1,C/10000,(1-C/SMA(C,13,1))*100);RKS:=REF(KS,1);MLS:=RKS/KS>1.23 AND RKS>10 AND C/REF(C,1)>1.02;J:STICKLINE(KS>=10,H,L,0,1),COLORWHITE,LINETHICK2;权:EMA(C,13),COLORRED,LINETHICK2;证:EMA(KS*C/100+权,3), COLORFF9933,LINETHICK2;反弹:STICKLINE(MLS=1,H,L,0,1),COLORFF00FF,LINETHICK2;STICKLINE(权>证,权,证,4,1),COLORFF00FF;STICKLINE(C>=O,H,L,0,0),COLORRED;STICKLINE(C>=O,C,O,2.8,0),COLOR0000DD;STICKLINE(C>=O,C,O,1,0),COLORRED;STICKLINE(C<O,H,L,0,0),COLORGRAY;STICKLINE(C<O,C,O,2.8,0),COLORGRAY;STICKLINE(C<O,C,O,1,0),COLOR888888;STICKLINE(1,O,C,0,0),COLORFFFFFF;STICKLINE(KS>10,H,L,0,0),COLORWHITE,LINETHICK1;STICKLINE(KS>10,O,C,2.8,1),COLORWHITE,LINETHICK1;STICKLINE(MLS,H,L,0,0),COLOR00FFFF,LINETHICK1;STICKLINE(MLS,O,C,2.8,0),COLOR00FFFF,LINETHICK1;VAR1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);VAR2:=CROSS(VAR1,0.9);VAR33:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);VAR44:=CROSS(VAR33,0.9);压力:= REF(HIGH,BARSLAST(VAR2)), POINTDOT,COLOREA91B5;STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2)),REF(HIGH,BA RSLAST(VAR2)),2,0),COLOREA91B5;支撑:= REF(LOW,BARSLAST(VAR44)), POINTDOT,COLOR00B4FF;STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR44)),REF(LOW,BA RSLAST(VAR44)),2,0),COLOR00B4FF;下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);ARSV:=SMA(下档线,3,1);AK:=SMA(ARSV,3,1);AD:=((3 * ARSV) - (2 * AK));AJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);ARSV24:=SMA(AJ12,3,1);AK24:=SMA(ARSV24,3,1);AD24:=((3 * ARSV24) - (2 * AK24));撑压位:=IF(CROSS(AD24,AD),HIGH,REF(HIGH,BARSLAST(CROSS(AD2 4,AD))));底:=LLV(HIGH,30);STICKLINE(BARSTATUS=2 ,撑压位,撑压位,30,1),LINETHICK1,COLORFFFFFF;DRAWTEXT(ISLASTBAR ,撑压位,' 撑压'),COLORFFFFFF;STICKLINE(BARSTATUS=2 ,底,底,30,1),COLOR00FF00,LINETHICK1;DRAWTEXT(ISLASTBAR ,底,' 底线'),COLOR00FF00;底2:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底2) AND REF(底2,1)>REF(HIGH,1) OR CROSS(HIGH,底2),L,'---铁底'),COLOR00FF00;X11:=(3*CLOSE+HIGH+LOW+OPEN)/6;X22:=EMA(X11,10);X3:=REF(X22,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T;VARA:=IF(CLOSE>1000,VAR8T,VAR9T);逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;X L2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(X L2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1);DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X22>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4))*4*25,87.5) AND VAR1T<40,87,0) AND X22>X3,LOW,'←短买'),COLOR00AAAA;DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12) -EMA((CLOSE*2+HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X22>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00;{DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;}DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27);L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 AND L25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF;VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;FA:=REF(H,N1)=HHV(H,2*N1+1);FAA:=FILTER(FA,N1);FB:=BACKSET(FAA,N1+1);FC1:=FILTER(FB,N1);FC:=FC1 OR BARSTATUS=2;FA2:=REF(L,N1)=LLV(L,2*N1+1);FAA2:=FILTER(FA2,N1);FB2:=BACKSET(FAA2,N1+1);FC22:=FILTER(FB2,N1);FC2:=FC22 AND NOT(FC1);FEA:=BACKSET(FC,REF(BARSLAST(FC2),1)+1);FEB:=FEA>REF(FEA,1);FEE:=BACKSET(FEB,2);FFF1:=FEE>REF(FEE,1);FEE2:=BACKSET(FFF1 AND COUNT(FC,REF(BARSLAST(FC2),1)+2)=0,REF(BARSLAST(FC2),1)+ 2);FFF2:=FEE2>REF(FEE2,1);FEE3:=BACKSET(FFF2 AND COUNT(FC,REF(BARSLAST(FC2),1)+2)=0,REF(BARSLAST(FC2),1)+ 2);FFF3:=FEE3>REF(FEE3,1);FJS:=IF(FC,COUNT(FC2,REF(BARSLAST(FC),1)+1),0);FG1:=IF(FJS=1 AND FC,BARSLAST(FFF1),0);FGA:=IF(FC AND REF(L,BARSLAST(FFF1))>=REF(L,BARSLAST(FFF2)),BARSLAST(FFF 2),BARSLAST(FFF1));FG2:=IF(FJS=2 AND FC,FGA,0);FG3:=IF(FJS>=3 AND FC,IF(FC ANDREF(L,FGA)>=REF(L,BARSLAST(FFF3)),BARSLAST(FFF3),FGA),0);FGG:=FG1+FG2+FG3;FJA:=BACKSET(FC,FGG);FJB:=FJA>REF(FJA,1);FJJ:=BACKSET(FJB,2);FLD:=FJJ>REF(FJJ,1);FLD1:=FLD OR BARSTATUS=2;FHEA:=BACKSET(FLD1,REF(BARSLAST(FC),1)+1);FHEB:=FHEA>REF(FHEA,1);FHEE:=BACKSET(FHEB,2);FHFF1:=FHEE>REF(FHEE,1);FHEE2:=BACKSET(FHFF1 AND COUNT(FLD1,REF(BARSLAST(FC),1)+2)=0,REF(BARSLAST(FC),1)+ 2);FHFF2:=FHEE2>REF(FHEE2,1);FHEE3:=BACKSET(FHFF2 AND COUNT(FLD1,REF(BARSLAST(FC),1)+2)=0,REF(BARSLAST(FC),1)+ 2);FHFF3:=FHEE3>REF(FHEE3,1);FHJS:=IF(FLD1,COUNT(FC1,REF(BARSLAST(FLD1),1)+1),0);FHG1:=IF(FHJS=1 AND FLD1,BARSLAST(FHFF1),0);FHGA:=IF(FLD1 AND REF(H,BARSLAST(FHFF1))<=REF(H,BARSLAST(FHFF2)),BARSLAST (FHFF2),BARSLAST(FHFF1));FHG2:=IF(FHJS=2 AND FLD1,FHGA,0);FHG3:=IF(FHJS>=3 AND FLD1,IF(FLD1 AND REF(H,FHGA)<=REF(H,BARSLAST(FHFF3)),BARSLAST(FHFF3),FHG A),0);FHGG:=FHG1+FHG2+FHG3;FHJA:=BACKSET(FLD1,FHGG);FHJB:=FHJA>REF(FHJA,1);FHJJ:=BACKSET(FHJB,2);FHD:=FHJJ>REF(FHJJ,1);FX1:=BACKSET(BARSTATUS=2,BARSLAST(FLD)+1);FX2:=FX1>REF(FX1,1);FY1:=BACKSET(BARSTATUS=2,BARSLAST(FHD)+1);FY2:=FY1>REF(FY1,1);FZ1:=IF(K=1 AND BARSLAST(FX2)<BARSLAST(FY2),FX2,FY2);FZ2:=IF(BARSLAST(FX2)<BARSLAST(FY2),L,H);DRAWLINE(FZ1,FZ2,BARSTATUS=2,C,0),DOTLINE,COLORFF9 900;FUU:=BACKSET(BARSTATUS=2,BARSLAST(FLD)+1);FVV:=FUU>REF(FUU,1);FWW:=BACKSET(FVV,REF(BARSLAST(FLD),1)+2);FXX:=(K=1 OR K=0) AND FWW>REF(FWW,1);高点1:=DRAWLINE(FXX,L,FVV,L,1),COLOR00FFFF;FUU2:=BACKSET(BARSTATUS=2,BARSLAST(FHD)+1);FVV2:=FUU2>REF(FUU2,1);FWW2:=(K=1 OR K=0) AND BACKSET(FVV2,REF(BARSLAST(FHD),1)+2);FXX2:=FWW2>REF(FWW2,1);低点1:=DRAWLINE(FXX2,H,FVV2,H,1),COLOR00FFFF;IF(BETWEEN(高点1,高点,低点),高点1,DRAWNULL)DOTLINE,COLORYELLOW,LINETHICK1;IF(BETWEEN(低点1,高点,低点),低点1,DRAWNULL)DOTLINE,COLORYELLOW,LINETHICK1;V7:=BARSTATUS=2;V8:=(REF(HIGH,N) = HHV(HIGH,((2 * N) + 1)));V9:=FILTER(V8,N);VA:=BACKSET(V9,(N + 1));VB:=FILTER(VA,N);VC:=(VB OR V7);VD:=(REF(LOW,N) = LLV(LOW,((2 * N) + 1)));VE:=FILTER(VD,N);VF:=BACKSET(VE,(N + 1));V10:=FILTER(VF,N);V11:=(V10 AND NOT(VB));V12:=BACKSET(VC,(REF(BARSLAST(V11),1) + 1));V13:=(V12 > REF(V12,1));V14:=BACKSET(V13,2);V15:=(V14 > REF(V14,1));V16:=BACKSET((V15 AND (COUNT(VC,(REF(BARSLAST(V11),1) + 2)) = 0)),(REF(BARSLAST(V11),1) + 2));V17:=(V16 > REF(V16,1));V18:=BACKSET((V17 AND (COUNT(VC,(REF(BARSLAST(V11),1) + 2)) = 0)),(REF(BARSLAST(V11),1) + 2));V19:=(V18 > REF(V18,1));V1A:=IF(VC,COUNT(V11,(REF(BARSLAST(VC),1) + 1)),0);V1B:=IF(((V1A = 1) AND VC),BARSLAST(V15),0);V1C:=IF((VC AND (REF(LOW,BARSLAST(V15)) >= REF(LOW,BARSLAST(V17)))),BARSLAST(V17),BARSLAST(V15));V1D:=IF(((V1A = 2) AND VC),V1C,0);V1E:=IF(((V1A >= 3) AND VC),IF((VC AND (REF(LOW,V1C) >= REF(LOW,BARSLAST(V19)))),BARSLAST(V19),V1C),0);V1F:=((V1B + V1D) + V1E);V20:=BACKSET(VC,V1F);V21:=(V20 > REF(V20,1));V22:=BACKSET(V21,2);V23:=(V22 > REF(V22,1));V24:=(V23 OR V7);V25:=BACKSET(V24,(REF(BARSLAST(VC),1) + 1));V26:=(V25 > REF(V25,1));V27:=BACKSET(V26,2);V28:=(V27 > REF(V27,1));V29:=BACKSET((V28 AND (COUNT(V24,(REF(BARSLAST(VC),1) + 2)) = 0)),(REF(BARSLAST(VC),1) + 2));V2A:=(V29 > REF(V29,1));V2B:=BACKSET((V2A AND (COUNT(V24,(REF(BARSLAST(VC),1) + 2)) = 0)),(REF(BARSLAST(VC),1) + 2));V2C:=(V2B > REF(V2B,1));V2D:=IF(V24,COUNT(VB,(REF(BARSLAST(V24),1) + 1)),0);V2E:=IF(((V2D = 1) AND V24),BARSLAST(V28),0);V2F:=IF((V24 AND (REF(HIGH,BARSLAST(V28)) <= REF(HIGH,BARSLAST(V2A)))),BARSLAST(V2A),BARSLAST(V28));V30:=IF(((V2D = 2) AND V24),V2F,0);V3B:=IF(((V2D >= 3) AND V24),IF((V24 AND (REF(HIGH,V2F) <= REF(HIGH,BARSLAST(V2C)))),BARSLAST(V2C),V2F),0);V3C:=((V2E + V30) + V3B);V3D:=BACKSET(V24,V3C);V3E:=(V3D > REF(V3D,1));AA:=BACKSET(V3E,2);AAA:=(AA > REF(AA,1));BB:=BACKSET(V7,(BARSLAST(AAA) + 1));CC1:=(BB > REF(BB,1));CC:=BACKSET(CC1,(REF(BARSLAST(AAA),1) + 2));AAA2:=((K=2 OR K=0) AND CC > REF(CC,1));压1:=DRAWLINE(AAA2,HIGH,CC1,HIGH,1),COLORFF0000,LINETHIC K2;BB2:=(REF(HIGH,4) = HHV(HIGH,((2 * 4) + 1)));CC22:=FILTER(BB2,4);CC2:=BACKSET(CC22,(4 + 1));EA:=FILTER(CC2,4);EB:=(EA OR BARSTATUS=2);A6:=(REF(LOW,4) = LLV(LOW,((2 * 4) + 1)));EE:=FILTER(A6,4);FF1:=BACKSET(EE,(4 + 1));EE2:=FILTER(FF1,4);FF2:=(EE2 AND NOT(EA));EE3:=BACKSET(EB,(REF(BARSLAST(FF2),1) + 1));FF3:=(EE3 > REF(EE3,1));JS:=BACKSET(FF3,2);G1:=(JS > REF(JS,1));GA:=BACKSET((G1 AND (COUNT(EB,(REF(BARSLAST(FF2),1) + 2)) = 0)),(REF(BARSLAST(FF2),1) + 2));G2:=(GA > REF(GA,1));G3:=BACKSET((G2 AND (COUNT(EB,(REF(BARSLAST(FF2),1) + 2)) = 0)),(REF(BARSLAST(FF2),1) + 2));GG:=(G3 > REF(G3,1));JA:=IF(EB,COUNT(FF2,(REF(BARSLAST(EB),1) + 1)),0);JB:=IF(((JA = 1) AND EB),BARSLAST(G1),0);JJ:=IF((EB AND (REF(LOW,BARSLAST(G1)) >= REF(LOW,BARSLAST(G2)))),BARSLAST(G2),BARSLAST(G1));LD:=IF(((JA = 2) AND EB),JJ,0);LD1:=IF(((JA >= 3) AND EB),IF((EB AND (REF(LOW,JJ) >= REF(LOW,BARSLAST(GG)))),BARSLAST(GG),JJ),0);HEA:=((JB + LD) + LD1);HEB:=BACKSET(EB,HEA);HEE:=(HEB > REF(HEB,1));HFF1:=BACKSET(HEE,2);HEE2:=(HFF1 > REF(HFF1,1));HFF2:=(HEE2 OR BARSTATUS=2);HEE3:=BACKSET(HFF2,(REF(BARSLAST(EB),1) + 1));HFF3:=(HEE3 > REF(HEE3,1));HJS:=BACKSET(HFF3,2);HG1:=(HJS > REF(HJS,1));HGA:=BACKSET((HG1 AND (COUNT(HFF2,(REF(BARSLAST(EB),1) + 2)) = 0)),(REF(BARSLAST(EB),1) + 2));HG2:=(HGA > REF(HGA,1));HG3:=BACKSET((HG2 AND (COUNT(HFF2,(REF(BARSLAST(EB),1) + 2)) = 0)),(REF(BARSLAST(EB),1) + 2));HGG:=(HG3 > REF(HG3,1));HJA:=IF(HFF2,COUNT(EA,(REF(BARSLAST(HFF2),1) + 1)),0);HJB:=IF(((HJA = 1) AND HFF2),BARSLAST(HG1),0);HJJ:=IF((HFF2 AND (REF(HIGH,BARSLAST(HG1)) <= REF(HIGH,BARSLAST(HG2)))),BARSLAST(HG2),BARSLAST(HG1));HD:=IF(((HJA = 2) AND HFF2),HJJ,0);X1:=IF(((HJA >= 3) AND HFF2),IF((HFF2 AND (REF(HIGH,HJJ) <= REF(HIGH,BARSLAST(HGG)))),BARSLAST(HGG),HJJ),0);X2:=((HJB + HD) + X1);Y1:=BACKSET(HFF2,X2);Y2:=(Y1 > REF(Y1,1));Z1:=BACKSET(Y2,2);Z2:=(Z1 > REF(Z1,1));WW2:=BACKSET(BARSTATUS=2,(BARSLAST(HEE2) + 1));XX2:=(WW2 > REF(WW2,1));VAR246:=BACKSET(XX2,(REF(BARSLAST(HEE2),1) + 2));VAR247:=((K=2 OR K=0) AND VAR246 > REF(VAR246,1));压2:=DRAWLINE(VAR247,LOW,XX2,LOW,1),COLORFF0000,LINETHI CK2;VAR249:=BACKSET(BARSTATUS=2,(BARSLAST(Z2) + 1));VAR250:=(VAR249 > REF(VAR249,1));VAR251:=BACKSET(VAR250,(REF(BARSLAST(Z2),1) + 2));VAR252:=((K=2 OR K=0) AND VAR251 > REF(VAR251,1));支1:=DRAWLINE(VAR252,HIGH,VAR250,HIGH,1),COLORFF0000,LIN ETHICK1;IF(BETWEEN(压1,高点,低点),压1,DRAWNULL)DOTLINE,COLORFFFF00,LINETHICK1;IF(BETWEEN(压2,高点,低点),压2,DRAWNULL)DOTLINE,COLORFFFF00,LINETHICK1;IF(BETWEEN(支1,高点,低点),支1,DRAWNULL)DOTLINE,COLORFFFF00,LINETHICK1;WN:=P1;{原码 N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1);WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1);WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1);WB2:=FILTER(WA2,WN); WC2:=BACKSET(WB2,WN+1);WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR BARSTATUS=2 OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2));WH2:=WD1 AND NOT(WD2 AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 AND COUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR BARSTATUS=2 OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1;WF2:=BACKSET(WL2 AND COUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(BARSTATUS=2,BARSLAST(WHD)+1);WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET((K=3 OR K=0) AND BARSTATUS=2,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET((K=3 OR K=0) AND WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET((K=3 OR K=0) AND WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET((K=3 OR K=0) AND WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET((K=3 OR K=0) AND WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET((K=3 OR K=0) AND WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET((K=3 OR K=0) AND WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高}压力1:=DRAWLINE(WS2,H,W S1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),POINTDOT,COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),POINTDOT,COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),POINTDOT,COLOR0000CC;{★支撑3:};IF(BETWEEN(压力1,高点,低点),压力1,DRAWNULL),COLORGRAY,LINETHICK1;IF(BETWEEN(支撑1,高点,低点),支撑1,DRAWNULL),COLORGRAY,LINETHICK1;IF(BETWEEN(压力2,高点,低点),压力2,DRAWNULL)DOTLINE,COLORFF00FF,LINETHICK1;IF(BETWEEN(支撑2,高点,低点),支撑2,DRAWNULL)DOTLINE,COLORFF00FF,LINETHICK1;IF(BETWEEN(压力3,高点,低点),压力3,DRAWNULL),COLOR0000FF,LINETHICK1;IF(BETWEEN(支撑3,高点,低点),支撑3,DRAWNULL),COLOR0000FF,LINETHICK1;。
空间与时间及压力与支撑通达信指标公式源码
空间与时间及压力与支撑(主图源码)思路源于冷妞妞老师的灾后自救及飞远国际的MACD体现在K线上仅做参考用理解运用适合自己是最好的建一个引用{DP}HH:=IF(BETWEEN(DATE,1150601,1150630),H,-999);LL:=IF(BETWEEN(DATE,1150709,1150709),L,-999);T:=HHVBARS(HH,0);TL:=HHVBARS(LL,0);GWJ:DRAWLINE(CURRBARSCOUNT=CONST(T)+1,HH,ISLASTBAR,REF(HH,T),0),COLORY ELLOW;DWJ:DRAWLINE(CURRBARSCOUNT=CONST(TL)+1,LL,ISLASTBAR,REF(LL,TL),0),COLOR 00DD00;DC:C;{空间与时间及压力与支撑}{参数;D 0 5 0}GDZQ:=CONST(BARSLAST(CURRBARSCOUNT =1))+1;HH:=IF(GDZQ,H,-999);LL:=IF(GDZQ,L,-999);T:=HHVBARS(HH,0);TTD:=BARSLAST(L=LLV(L,T+1));T1:=BARSLAST(CURRBARSCOUNT=CONST(TTD)+1);XL:=REFX(MIN(C,O),BARSNEXT(T1=0)),COLORGREEN;高位价:DRAWLINE(CURRBARSCOUNT=CONST(T)+1,HH,ISLASTBAR,REF(HH,T),0),COLORYEL LOW;低位价:DRAWLINE(CURRBARSCOUNT=CONST(T1)+1,LL,ISLASTBAR,REF(LL,T1),0),COLOR00 FF00;YY:=高位价-低位价;底点到高点:=YY/高位价*100;YYY:=STRCAT(' 高位价到低位价幅度:- ',CON2STR(底点到高点,0));DRAWTEXT_FIX(ISLASTBAR,0.01,0.2,0,YYY),COLOR00DD00;DRAWTEXT_FIX(ISLASTBAR,0.15,0.2,0,' %'),COLORFFCC99;YX:=C-低位价;YYX:=YX/低位价*100;YYYX:=STRCAT(' 近期低点到当前幅度: ',CON2STR(YYX,0));DRAWTEXT_FIX(ISLASTBAR,0.01,0.25,0,YYYX),COLOREE99EE;DRAWTEXT_FIX(ISLASTBAR,0.141,0.25,0,' %'),COLOREEAAEE;高点周期:=CONST(T);底点周期:=CONST(T1);{底点周期:=CONST(BARSLAST(T1))+1;}高底点周期:=ABS(高点周期-底点周期);高点到当前:=STRCAT(' 高点到当前周期: ',CON2STR(高点周期,0));底点到当前:=STRCAT(' 底点到当前周期: ',CON2STR(底点周期,0));高底点周期A:=STRCAT(' 高点到底点周期: ',CON2STR(高底点周期,0)); DRAWTEXT_FIX(ISLASTBAR,0.01,0.4,0,高点到当前),COLOREEAAEE; DRAWTEXT_FIX(ISLASTBAR,0.12,0.4,0,' 天'),COLORFFCC99; DRAWTEXT_FIX(ISLASTBAR,0.01,0.35,0,底点到当前),COLOR00EEEE; DRAWTEXT_FIX(ISLASTBAR,0.12,0.35,0,' 天'),COLORFFCC99; DRAWTEXT_FIX(ISLASTBAR,0.01,0.3,0,高底点周期A),COLOR00DD00; DRAWTEXT_FIX(ISLASTBAR,0.12,0.3,0,' 天'),COLORFFCC99;HD:=CALCSTOCKINDEX('999999','DP',1);LD:=CALCSTOCKINDEX('999999','DP',2);CD:=CALCSTOCKINDEX('999999','DP',3);YYD:=HD-LD;底点到高点D:=YYD/HD*100;YYYD:=STRCAT('大盘高位价到低位价幅度:- ',CON2STR(底点到高点D,0)); DRAWTEXT_FIX(ISLASTBAR,0.01,0.05,0,YYYD),COLOR00DD00; DRAWTEXT_FIX(ISLASTBAR,0.17,0.05,0,' %'),COLORFFCC99;YXD:=CD-LD;YYXD:=YXD/LD*100;YYYXD:=STRCAT('大盘近期低点到当前幅度: ',CON2STR(YYXD,0)); DRAWTEXT_FIX(ISLASTBAR,0.01,0.1,0,YYYXD),COLOREE99EE; DRAWTEXT_FIX(ISLASTBAR,0.165,0.1,0,' %'),COLOREEAAEE;高价AX:=IF(高位价AND D>=1,高位价*0.92,DRAWNULL);高价BX:=IF(高位价AND D>=1,高位价*0.87,DRAWNULL);高价CX:=IF(高位价AND D>=2,高位价*0.80,DRAWNULL);高价DX:=IF(高位价AND D>=2,高位价*0.75,DRAWNULL);高价EX:=IF(高位价AND D>=3,高位价*0.67,DRAWNULL);高价FX:=IF(高位价AND D>=3,高位价*0.63,DRAWNULL);高价GX:=IF(高位价AND D>=4,高位价*0.55,DRAWNULL);高价HX:=IF(高位价AND D>=4,高位价*0.50,DRAWNULL);高价LX:=IF(高位价AND D>=5,高位价*0.38,DRAWNULL);高价SX:=IF(高位价AND D>=5,高位价*0.33,DRAWNULL); DRAWBAND(高位价,RGB(55,55,55),高价AX,RGB(0,0,0));DRAWBAND(高价AX,RGB(91,164,161),高价BX,RGB(91,164,161)); DRAWBAND(高价BX,RGB(66,66,66),高价CX,RGB(0,0,0)); DRAWBAND(高价CX,RGB(95,159,130),高价DX,RGB(95,159,130)); DRAWBAND(高价DX,RGB(77,77,77),高价EX,RGB(0,0,0)); DRAWBAND(高价EX,RGB(107,100,152),高价FX,RGB(107,100,152)); DRAWBAND(高价FX,RGB(88,88,88),高价GX,RGB(0,0,0)); DRAWBAND(高价GX,RGB(124,92,159),高价HX,RGB(124,92,159)); DRAWBAND(高价LX,RGB(99,99,99),高价HX,RGB(99,99,99)); DRAWBAND(高价LX,RGB(165,92,131),高价SX,RGB(165,92,131));低价A:=IF(低位价AND D>=1,低位价*1.08,DRAWNULL);低价B:=IF(低位价AND D>=1,低位价*1.12,DRAWNULL);低价C:=IF(低位价AND D>=2,低位价*1.20,DRAWNULL);低价D:=IF(低位价AND D>=2,低位价*1.25,DRAWNULL);低价E:=IF(低位价AND D>=3,低位价*1.33,DRAWNULL);低价F:=IF(低位价AND D>=3,低位价*1.37,DRAWNULL);低价G:=IF(低位价AND D>=4,低位价*1.45,DRAWNULL);低价H:=IF(低位价AND D>=4,低位价*1.50,DRAWNULL);低价K:=IF(低位价AND D>=5,低位价*1.62,DRAWNULL);低价L:=IF(低位价AND D>=5,低位价*1.67,DRAWNULL); DRAWBAND(低位价,RGB(161,94,151),低价A,RGB(161,94,151)); DRAWBAND(低价A,RGB(177,155,77),低价B,RGB(177,155,77)); DRAWBAND(低价B,RGB(159,95,149),低价C,RGB(159,95,149)); DRAWBAND(低价C,RGB(214,176,39),低价D,RGB(214,176,39)); DRAWBAND(低价D,RGB(162,92,160),低价E,RGB(162,92,160)); DRAWBAND(低价E,RGB(221,180,32),低价F,RGB(221,180,32)); DRAWBAND(低价F,RGB(169,85,162),低价G,RGB(169,85,162)); DRAWBAND(低价H,RGB(188,169,64),低价G,RGB(188,169,64)); DRAWBAND(低价K,RGB(114,72,179),低价H,RGB(0,0,0)); DRAWBAND(低价K,RGB(179,199,61),低价L,RGB(179,199,61)); DRAWTEXT(ISLASTBAR AND D>=1,低价A,'8%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=1,低价B,'12%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=2,低价C,'20%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=2,低价D,'25%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=3,低价E,'33%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=3,低价F,'37%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=4,低价G,'45%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=4,低价H,'50%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=5,低价K,'62%'),COLOR208FFF; DRAWTEXT(ISLASTBAR AND D>=5,低价L,'67%'),COLOR208FFF; DRAWKLINE(H,O,L,C);AS:=(O+H+L+C)/4;SYA:EMA(AS,5),LINETHICK1,COLORFFFFFF;SYAA:EMA(AS,10),LINETHICK1,COLOR00FFFF;SYAB:EMA(AS,55),LINETHICK1,COLOR208FFF;SYAC:EMA(AS,20),LINETHICK1,COLOREE99EE;SYAD:EMA(AS,120),LINETHICK1,COLOREEEE00;DIF:=EMA(CLOSE,3)-EMA(CLOSE,7),COLOR00FFFF;DEA:=EMA(DIF,3);DRAWICON(CROSS(DIF,DEA) AND DIF>0,L,29);DRAWICON(CROSS(DEA,DIF) AND DIF>0,H,37); DRAWICON(CROSS(DIF,DEA) AND DIF<0,L,1);{添加到参数精灵里调整D: Param#0 1--5显示幅度压力与支撑}。