/* ?
EMA30:EMA(C,30),COLORWHITE,LINETHICK3;
EMA60:EMA(C,60),COLORFF00FF,LINETHICK2;
EMA90:EMA(C,90),COLORYELLOW,LINETHICK2;
EMA120:EMA(C,120),COLORFFCC66,LINETHICK2;
EMA250:EMA(C,250),COLORBLUE,LINETHICK2;
SS:=CROSS(EMA30,EMA60) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(EMA30,EMA120) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(EMA60,EMA90) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(EMA30,EMA90) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 {AND CROSS(EMA30,EMA120)};
DRAWICON(SS,L-0.04,1);
DD:=CROSS(EMA60,EMA90) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(EMA60,EMA250) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(EMA90,EMA120) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018
OR CROSS(EMA60,EMA120) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(EMA30,EMA250);
{DD:=CROSS(EMA30,EMA250);}
DRAWICON(DD,L-0.04,3);
Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;?
Q3:=SMA(Q2, 9, 1);?
Q4:=SMA(Q3, 3, 1);?
短期趋势:3*Q3-2*Q4,COLORWHITE,LINETHICK3;?
中期趋势:EMA(Q3, 3),COLORRED,LINETHICK3;?
DRAWTEXT(CROSS(中期趋势,?短期趋势) AND REF(短期趋势,1)>80, REF(短期趋势,3), '▼逢高派发'), COLOR00FF00,LINETHICK5;
▲逢低关注: DRAWTEXT(REF(CROSS(中期趋势,短期趋势),82) AND?中期趋势>1.3*短期趋势,短期趋势,'▲逢低关注'), COLOR00FFFF, LINETHICK1;
▲抄底: DRAWTEXT(REF(CROSS(短期趋势,中期趋势),1) AND?短期趋势>1.3*中期趋势,中期趋势,'▲抄底'),COLORBLUE,LINETHICK1;
VAR3:=PEAKBARS(3,5,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:IF(顶>REF(顶,1),50,0),COLORGREEN, LINETHICK2;
DRAWTEXT(顶A=50,45,'小?心'),COLO
*/
A1:=REF(H,8)=HHV(H,2*8+1);
B1:=FILTER(A1,8);
C1:=BACKSET(B1,8+1);
D1:=FILTER(C1,8);
{高点}
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE1(D1,H,S11,H,1),COLORBLUE;
A2:=REF(L,8)=LLV(L,2*8+1);
B2:=FILTER(A2,8);
C2:=BACKSET(B2,8+1);
D2:=FILTER(C2,8);
{低点}
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE1(D2,L,U11,L,1),COLORBLUE;
M:=INTPART(3*8/5);
A12:=REF(H,4)=HHV(H,2*4+1);
B12:=FILTER(A12,4);
C12:=BACKSET(B12,4+1);
D12:=FILTER(C12,4);
{高点}
R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1);
S112:=R112>REF(R112,1);
DRAWLINE1(D12,H,S112,H,1),COLORRED;
A22:=REF(L,4)=LLV(L,2*4+1);
B22:=FILTER(A22,4);
C22:=BACKSET(B22,4+1);
D22:=FILTER(C22,4);
{低点}
T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);
U112:=T112>REF(T112,1);
DRAWLINE1(D22,L,U112,L,1),COLORRED;
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(VAR2222)),0.5,1),COLOREA91B5,LINETHICK3;
支撑:= REF(LOW,BARSLAST(VAR4444));
STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW,BARSLAST(VAR4444)),0.5,1),COLOR00B4FF,LINETHICK3;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
RRRSV:=SMA(下档线,3,1);
KKK:=SMA(RRRSV,3,1);
DDD:=((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,DDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDD)))),COLORFFFFFF;
压力位:=IF(ISLASTBAR,压力2,NULL);
STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;
底部:=LLV(HIGH,30),COLOR00FF00;
底部位:=IF(ISLASTBAR,底部,NULL);
STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00;