N:=5;
长期趋势250日线:MA(CLOSE,250),COLORBROWN;
中长趋势120日线:MA(CLOSE,120),COLORLIGRAY;
中期趋势60日线:MA(CLOSE,60),COLORGREEN;
短期趋势20日线:MA(CLOSE,20),COLORMAGENTA;
MA5:MA(CLOSE,5),COLORWHITE;
IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLORRED;
MA10:MA(CLOSE,10),COLORYELLOW;
IF(MA10>REF(MA10,1),MA10,DRAWNULL),COLORRED;
MA20:MA(CLOSE,20),COLORMAGENTA;
IF(MA20>REF(MA20,1),MA20,DRAWNULL),COLORRED;
MA60:MA(CLOSE,60),COLORGREEN;
IF(MA60>REF(MA60,1),MA60,DRAWNULL),COLORRED;
MA120:MA(CLOSE,120),COLORLIGRAY;
IF(MA120>REF(MA120,1),MA120,DRAWNULL),COLORRED;
MA250:MA(CLOSE,250),COLORBROWN,LINESTICK;
IF(MA250>REF(MA250,1),MA250,DRAWNULL),COLORRED;
STICKLINE(C<=MA250,H,L,3,0),COLORBLACK;
DRAWTEXT_FIX(N,0,0.01,0,'道氏理论的基本法则');
DRAWTEXT_FIX(N,0,0.04,0,'一、平均指数包含一切,价格包容消化一切因素;
可以这样认为,股票的走势包涵了一切因素『政治、经济政策,庄家动作,大众心理等。'),COLORYELLOW;
DRAWTEXT_FIX(N,0,0.07,0,'二、市场有三种趋势;
趋势定义:上升趋势必须体现在依次上升的峰和谷上。相反,下降趋势则以依次下降的峰和谷为特征。(经典定义,是所有趋势分析的起点)'),COLORYELLOW;
DRAWTEXT_FIX(N,0,0.1,0,'更多用法请看指标注释'),COLORGREEN;
DRAWTEXT_FIX(N,0,0.13,0,'不想看主图提示,请把参数N调成0'),COLORGREEN;
DRAWICON(CROSS(MA5,MA10),MA10,1);
DRAWICON(CROSS(MA10,MA5),MA5,2);