【通达信源码分享】均线三角主图公式 源码 使用说明
2022-08-03未知 编 辑:掌上指标
使用注意事项:
均线三角公式主要反映近期走势的最低点,但确认最低点要注意的是第二天的最低价要高于前一天的最低价,如果是,三角最低点成立否则还会继续走低,选股时要看清,否则会继续向后被套
公式源码:
MA1:MA(CLOSE,5);
M:=30; N:=30;
TJ:=HHV(H,M)=H;
TJT:=BARSLAST(TJ);
TJ1:=LLV(L,N)=L;
TJ1T:=BARSLAST(TJ1);
DRAWLINE(H=HHV(H,M),HHV(H,M),L=LLV(L,N),LLV(LOW,N),0)COLORYELLOW;
NOTEXT2:DRAWLINE(H=HHV(H,M),HHV(H,M),L=LLV(L,N),REF(H,TJT),0)COLORYELLOW;
STICKLINE(NOTEXT2 AND L=LLV(L,N) AND FILTERX(L=LLV(L,N),TJT+1),
REF(L,TJ1T),REF(H,TJT),0,0)COLORYELLOW;
均线:SUM(CLOSE*VOL,FROMOPEN)/SUM(VOL,FROMOPEN),COLORYELLOW;
买入:IF(MA1>REF(MA1,1),MA1,DRAWNULL),LINETHICK3,COLORRED;
卖出:IF(MA1<REF(MA1,1),MA1,DRAWNULL),LINETHICK1,COLORWHITE;
MAA10:=MA(C,10);
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.1,'↖跟庄买进'),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;