咨询内容: 在1分钟K线上可否叠加分时均价黄线,,如何叠加,
技术人员:  
分时图中的均价黄色线无法直接提取,您可以通过SETTLE函数近似取得。SETTLE计算开盘以来至今用量进行加权计算的价格均值。

源码如下:

M:=EMA(REF(SETTLE,1),1);
 A:=M-REF(M,1);
 B:=REFX(A,1);
 AB:=IFELSE(SETTLE>=M,1,-1);
 DRAWSL(REFX(AB,1)=1,M,B,1,0,COLORMAGENTA);
 DRAWSL(REFX(AB,1)=-1,M,B,1,0,COLORGREEN);
 www.GSZB.com:C,NODRAW; DRAWLINE(SETTLE<C&&C>O,H,SETTLE<C&&C>O,C,COLORRED);
 DRAWLINE(SETTLE<C&&C>O,L,SETTLE<C&&C>O,O,COLORRED);
 DRAWLINE(SETTLE<C&&C<O,H,SETTLE<C&&C<O,O,COLORRED);
 DRAWLINE(SETTLE<C&&C<O,L,SETTLE<C&&C<O,C,COLORRED);
 DRAWLINE(SETTLE<C&&C=O,L,SETTLE<C&&C=O,C,COLORRED);
 DRAWLINE(SETTLE<C&&C=O,H,SETTLE<C&&C=O,C,COLORRED);
 DRAWLINE(SETTLE>C&&C>O,H,SETTLE>C&&C>O,C,COLORLIGHTGREEN);
 DRAWLINE(SETTLE>C&&C>O,L,SETTLE>C&&C>O,O,COLORLIGHTGREEN);
 DRAWLINE(SETTLE>C&&C<O,H,SETTLE>C&&C<O,O,COLORLIGHTGREEN);
 DRAWLINE(SETTLE>C&&C<O,L,SETTLE>C&&C<O,C,COLORLIGHTGREEN);
 DRAWLINE(SETTLE>C&&C=O,L,SETTLE>C&&C=O,C,COLORLIGHTGREEN);
 DRAWLINE(SETTLE>C&&C=O,H,SETTLE>C&&C=O,C,COLORLIGHTGREEN);
 STICKLINE(SETTLE<=C&&C>=O,C,O,COLORRED,1);
 STICKLINE(SETTLE<C&&C<O,C,O,COLORRED,0);
 STICKLINE(SETTLE>C&&C>=O,C,O,COLORLIGHTGREEN,1);
 STICKLINE(SETTLE>=C&&C<=O,C,O,COLORLIGHTGREEN,0);

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。