通达信长线趋势指标
源码:
VAR1:=IF(YEAR=2008 AND MONTH>7, 0, 1);
VAR2:=(CLOSE-REF(CLOSE, 1))/REF(CLOSE, 1)*100*VAR1;
VAR3:=(INDEXC-REF(INDEXC, 1))/REF(INDEXC, 1)*100*VAR1;
VAR4:=VAR2-VAR3;
VAR5:=(OPEN-REF(CLOSE, 1))/REF(CLOSE, 1)*100*VAR1;
VAR6:=(INDEXO-REF(INDEXC, 1))/REF(INDEXC, 1)*100*VAR1;
VAR7:=VAR5-VAR6;
STICKLINE(VAR4>=0, SUM(REF(VAR4, 1), 0)+100+VAR7, SUM(VAR4, 0)+100, 2, 0), COLORRED;
STICKLINE(VAR4<0, SUM(REF(VAR4, 1), 0)+100+VAR7, SUM(VAR4, 0)+100, 2, 0), COLOR00FF00;
K13:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,204) ,COLORWHITE;
K14:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,216) ,COLORWHITE;
K15:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,228) ,COLORWHITE;
K16:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,260) ,COLORWHITE;
K1:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,6),COLORRED;
K2:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,14) ,COLORRED;
K3:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,20) ,COLORRED;
K4:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,24) ,COLORLIGREEN;
K5:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,30) ,COLORYELLOW;
K6:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,36) ,COLORYELLOW;
K7:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,42) ,COLORYELLOW;
K8:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,48) ,COLORYELLOW;
K9:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,100) ,COLORBLUE;
K10:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,112) ,COLORBLUE;
K11:EXPMA(SUM(REF(VAR4, 1), 0)+100+VAR7,124) ,COLORBLUE;
K12:MA(SUM(REF(VAR4, 1), 0)+100+VAR7,138) ,COLORBLUE;