通达信K线同图周、日K线同时显示在主图,主图、源码
- 1、先建引用公式:
- 001引用
- C1:C;
- O1:O;
- H1:H;
- L1:L;
- 2、K线同图周日
- WC:"001引用.C1#WEEK"LINETHICK0;
- WO1:=IF(WEEKDAY<REF(WEEKDAY,1),O,DRAWNULL);
- WO2:=IF(WO1= DRAWNULL,REF(WO1,1), WO1);
- WO3:=IF(WO2= DRAWNULL,REF(WO2,1), WO2);
- WO4:=IF(WO3= DRAWNULL,REF(WO3,1), WO3);
- WO:IF(WO4= DRAWNULL,REF(WO4,1), WO4)LINETHICK0;
- WH:HHV(H,WEEKDAY),LINETHICK0;
- WL:LLV(L,WEEKDAY),LINETHICK0;
- STICKLINE(WC>=WO,WO,WC,4,0),COLOR003399;
- STICKLINE(WC<WO,WO,WC,4,0),COLOR993300;
- DRAWKLINE(H,O,L,C);
- MA5:MA(C,5),COLORWHITE;
- MA10:MA(C,10),COLORYELLOW;
- JC:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;
- 参考价:=SMA(JC,5,1), CIRCLEDOT,COLORGREEN;
- 价:=IF(C>=参考价,参考价,DRAWNULL),CIRCLEDOT,COLOR0000FF;
3C81851838.jpg
|