日线周线自改版(源码 主图 贴图)介绍
日线周线自改版(源码 主图 贴图)
三根均线都是周线,用周线看趋势比较稳定,收益也有保障。
先做好引用公式:
{001引用}
C1:C;
O1:O;
再把下面的源码做第二条公式:
WC:"001引用.C1#WEEK"LINETHICK0;
WO:"001引用.O1#WEEK"LINETHICK0;
STICKLINE(WC>=WO,WO,WC,4,0),COLOR800080;
STICKLINE(WC<WO,WO,WC,4,0),COLOR006F00;
DRAWKLINE(H,O,L,C);
ZRR:=(YEAR-1992)*365+INTPART((YEAR-1989)/4)+IF(MONTH<=2,DAY+(MONTH-1)*31,DAY+
INTPART(13*(MONTH+1)/5)-7+(MONTH-1)*28+IF(INTPART(YEAR/4)=YEAR/4,1,0));
T:=BARSLAST(ZRR-REF(ZRR,1)>WEEKDAY-REF(WEEKDAY,1))+1;
T1:=REF(T,T)+T;
T2:=REF(T,T1)+T1;
T3:=REF(T,T2)+T2;
T4:=REF(T,T3)+T3;
T5:=REF(T,T4)+T4;
T6:=REF(T,T5)+T5;
T7:=REF(T,T6)+T6;
T8:=REF(T,T7)+T7;
T9:=REF(T,T8)+T8;
T10:=REF(T,T9)+T9;
三周:MA((REF(CLOSE,T)+REF(CLOSE,T1)+CLOSE)/3,3),LINETHICK1,COLORWHITE;
五周:MA((REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3)+CLOSE)/5,5),LINETHICK1,COLORCYAN;
十周:MA((REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3)+REF(CLOSE,T4)+REF(CLOSE,T5)+REF(CLOSE,T6)+REF(CLOSE,T7)+REF(CLOSE,T8)+CLOSE)/10,10),COLORYELLOW;
短:REF(WC,1)<REF(三周,1) AND WC>三周,COLORWHITE,NODRAW;
中:CROSS(三周,五周) AND WC>WO,COLORMAGENTA,NODRAW;{ AND WC>WO}
长:CROSS(五周,十周),COLORMAGENTA,NODRAW;
BBB:=中;
买进AA:=BARSLAST(BBB);
中天:买进AA+1,NODRAW;
BB:=长;
买进A:=BARSLAST(BB);
长天:买进A+1,NODRAW;
DRAWICON(长,十周*0.98,13);
DRAWICON(短,L*0.98,1);
DRAWICON(中,五周*0.98,11);
DRAWTEXT((中 OR 长),五周*0.98,'中级行情'),COLORYELLOW;
IF(五周>REF(MA(五周,1),1),五周,DRAWNULL),COLORRED,LINETHICK1;
IF(十周>REF(MA(十周,1),1),十周,DRAWNULL),COLORGREEN,LINETHICK1;
gd15506