股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信A压力支撑主图源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-9 11:30:03

以下是通达信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,BARSLAST(VAR2)),2,0),COLOREA91B5;

支撑:= REF(LOW,BARSLAST(VAR44)), POINTDOT,COLOR00B4FF;

STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR44)),REF(LOW,BARSLAST(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(AD24,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;

XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;

XL3:=MA(XL2,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(FFF2),BARSLAST(FFF1));

FG2:=IF(FJS=2 AND FC,FGA,0);

FG3:=IF(FJS>=3 AND FC,IF(FC AND REF(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),FHGA),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,COLORFF9900;

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,LINETHICK2;

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,LINETHICK2;

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,LINETHICK1;

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,WS1,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;






回复

举报

QQ|

GMT+8, 2024-11-18 10:30

快速回复 返回顶部 返回列表