分享一个自己拼凑起来有趋势有通道的通达信主图指标(箭头进出)
这个是通达信主图指标,手机已测,电脑就大家自己试试,应该都可以的
这个指标也是我自己拼凑起来的,分享给大家参考参考
主图指标源码:
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
X9:=FORCAST(C,9);
LLX:=LLV(FORCAST(C,9),2);
XX9:=X9*100-LLX*100;
VAR1A:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2A:=SMA(VAR1A,9,1)+100;
VAR3A:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4A:=SMA(VAR3A,3,1);
VAR5A:=SMA(VAR4A,3,1)+100;
VAR6A:=VAR5A-VAR2A;
端庄窝:=IF(VAR6A>21,VAR6A-21,0);
T1:=(XX9=0 AND 端庄窝<=REF(端庄窝,1));
T2:=(XX9=0 AND 端庄窝>REF(端庄窝,1));
T3:=(XX9>0 AND 端庄窝>REF(端庄窝,1));
T4:=(XX9>0 AND 端庄窝<=REF(端庄窝,1));
T5:=RSI1>=RSI2;
T6:=RSI1 STICKLINE(T1,H,L,0,1),COLORGRAY; STICKLINE(T1 AND C>O,O,C,3,1),COLORGRAY; STICKLINE(T1 AND C STICKLINE(T2 AND T5,H,L,0,1),COLORWHITE; STICKLINE(T2 AND T5 AND C>O,O,C,3,1),COLORWHITE; STICKLINE(T2 AND T5 AND C STICKLINE(T2 AND T6,H,L,0,1),COLORGRAY; STICKLINE(T2 AND T6 AND C>O,O,C,3,1),COLORGRAY; STICKLINE(T2 AND T6 AND C STICKLINE(T3,H,L,0,1),COLORRED; STICKLINE(T3 AND C>O,O,C,3,1),COLORRED; STICKLINE(T3 AND C STICKLINE(T4 AND T5,H,L,0,1),COLORWHITE; STICKLINE(T4 AND T5 AND C>O,O,C,3,1),COLORWHITE; STICKLINE(T4 AND T5 AND C STICKLINE(T4 AND T6,H,L,0,1),COLORGRAY; STICKLINE(T4 AND T6 AND C>O,O,C,3,1),COLORGRAY; STICKLINE(T4 AND T6 AND C STICKLINE(T3 AND C STICKLINE(T3 AND C>O AND C STICKLINE(T3 AND C HMA22:REF(MA(H,22),1);{平移前一日的22日高点均线到当前K线} B买 S卖 启动压力 N:=13; UR:=6; LR:=6; TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL); TC2:=CONST(BARSLAST(TC1=H))+1; UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1))); BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL); BC2:=CONST(BARSLAST(BC1=L))+1; LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1))); LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位} HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位} STICKLINE(IF(BC2>TC2,HP,LP),LOWER,UPPER,0,0),COLOR628962; STICKLINE(IF(BC2>TC2,LP,HP),LOWER,UPPER,0,0),COLOR628962; NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时} LR1:=FORCAST(C,NOD+1); NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8;{近点} LR2:=SLOPE(C,NOD+1); LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1))); FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8;{远点} EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8; AD:=ABS(NP-FP);{高差}; DBL:=BARSLAST(BC1!=DRAWNULL)+1; DBH:=BARSLAST(TC1!=DRAWNULL)+1; BSP:=IF(BC2>TC2,DBL,DBH)-1; LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP); AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL); AT2:=HHV(AT1-LRL,MAX(BC2,TC2)); AT3:=CONST(BARSLAST(AT1-LRL=AT2)); AT4:=CONST(IF(AT3=0,H,REF(H,AT3))); AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3))); ATL:=LRL+AT5; UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L UT2:=HHV(LRL-UT1,MAX(BC2,TC2)); UT3:=CONST(BARSLAST(LRL-UT1=UT2)); UT4:=CONST(IF(UT3=0,H,REF(H,UT3))); UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3))); UTL:=LRL-UT5; RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));{限制高} RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));{限制低} 中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLORYELLOW; 上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLORGREEN; 下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLORRED; EM01:=EMA(C,10); EM:=EMA(C,21); UP:=EMA(EM,13); DOWN:=EMA(EM,17); MIDD STICKLINE(MIDD>REF(MIDD,1),UP,DOWN,1,0),COLORMAGENTA;