请老师帮我加个画线的数据数字

01-11 21:36发布

DRAWSL(DAYBARPOS=1&&BACKSET(ISLASTBAR,DAYBARPOS),O,0,REF(DAYBARPOS,DAYBARPOS),0,COLORGREEN);//当日开盘价D...

DRAWSL(DAYBARPOS=1&&BACKSET(ISLASTBAR,DAYBARPOS),O,0,REF(DAYBARPOS,DAYBARPOS),0,COLORGREEN);//当日开盘价

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(C,1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(C,1),0,-1,0,COLORWHITE);//昨日收盘价

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(VALUEWHEN(DAYBARPOS=1,O),1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(VALUEWHEN(DAYBARPOS=1,O),1),0,-REF(DAYBARPOS,1),0,COLORWHITE);//昨日开盘价

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(HHV(MAX(O,C),DAYBARPOS),1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(HHV(MAX(O,C),DAYBARPOS),1),0,-REF(HHVBARS(C,DAYBARPOS),1),0,COLORWHITE);//昨日最高价

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(LLV(MIN(O,C),DAYBARPOS),1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(LLV(MIN(O,C),DAYBARPOS),1),0,-REF(LLVBARS(C,DAYBARPOS),1),0,COLORWHITE);//昨日最低价


这5条线,麻烦老师帮我在今天的最右边用标出画线的具体数值,今天开盘价用绿色字体
昨日的这几条用白色,然后帮加2个汉字有前面,如:昨开xx 昨高xx 昨低xx 昨收


付费偷看设置
发送
9条回答
文华解答
2楼-- · 01-11 22:38

参考

N:=DAYBARPOS;
DRAWSL(DAYBARPOS=1&&BACKSET(ISLASTBAR,DAYBARPOS),O,0,REF(DAYBARPOS,DAYBARPOS),0,COLORGREEN);//当日开盘价
DRAWTEXT(ISLASTBAR,REF(O,N-1),'今开:'),ALIGN2,COLORGREEN;
DRAWNUMBER1(ISLASTBAR,REF(O,N-1),REF(O,N-1),0),ALIGN0,COLORGREEN;

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(C,1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(C,1),0,-1,0,COLORWHITE);//昨日收盘价
DRAWTEXT(ISLASTBAR,REF(C,N),'昨收:'),ALIGN2,COLORWHITE;
DRAWNUMBER1(ISLASTBAR,REF(C,N),REF(C,N),0),ALIGN0,COLORWHITE;

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(VALUEWHEN(DAYBARPOS=1,O),1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(VALUEWHEN(DAYBARPOS=1,O),1),0,-REF(DAYBARPOS,1),0,COLORWHITE);//昨日开盘价
DRAWTEXT(ISLASTBAR,REF(REF(O,N-1),N),'昨开:'),ALIGN2,COLORWHITE;
DRAWNUMBER1(ISLASTBAR,REF(REF(O,N-1),N),REF(C,N),0),ALIGN0,COLORWHITE;

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(HHV(MAX(O,C),DAYBARPOS),1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(HHV(MAX(O,C),DAYBARPOS),1),0,-REF(HHVBARS(C,DAYBARPOS),1),0,COLORWHITE);//昨日最高价
DRAWTEXT(ISLASTBAR,REF(HHV(MAX(O,C),N),N),'昨高:'),ALIGN2,COLORWHITE;
DRAWNUMBER1(ISLASTBAR,REF(HHV(MAX(O,C),N),N),REF(HHV(MAX(O,C),N),N),0),ALIGN0,COLORWHITE;

DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(LLV(MIN(O,C),DAYBARPOS),1),0,REF(DAYBARPOS,DAYBARPOS),0,COLORWHITE),DOT;
DRAWSL(CROSS(BACKSET(ISLASTBAR,DAYBARPOS),0.5),REF(LLV(MIN(O,C),DAYBARPOS),1),0,-REF(LLVBARS(C,DAYBARPOS),1),0,COLORWHITE);//昨日最低价
DRAWTEXT(ISLASTBAR,REF(LLV(MIN(O,C),N),N),'昨低:'),ALIGN2,COLORWHITE;
DRAWNUMBER1(ISLASTBAR,REF(LLV(MIN(O,C),N),N),REF(LLV(MIN(O,C),N),N),0),ALIGN0,COLORWHITE;

文期王华
3楼-- · 01-11 22:58
NG:=BACKSET(ISLASTBAR,DAYBARPOS);//昨日收盘均价线
DRAWSL(NG,REF(SETTLE,DAYBARPOS),0,REF(DAYBARPOS,DAYBARPOS)-DAYBARPOS+1,0,COLORYELLOW);//昨日收盘均价线
LSETTLE:=REFX1(REF(SETTLE,DAYBARPOS),999);//昨日收盘均价线
NG4:=BACKSET(ISLASTBAR,SUMBARS(DAYBARPOS=1,1));//昨日收盘均价线
昨日收盘均价线:IF(NG4,LSETTLE,NULL),COLORYELLOW,NOTEXT;//昨日收盘均价线

请老师帮我划成黄成的虚线, 然后在线的附近今天的最右边,显示具体的数字,用黄色字体 多谢老师

文华解答
4楼-- · 01-11 23:18

参考

NG:=BACKSET(ISLASTBAR,DAYBARPOS);//昨日收盘均价线
DRAWSL(CROSS(NG,0.5),REF(SETTLE,DAYBARPOS),0,REF(DAYBARPOS,DAYBARPOS)-DAYBARPOS+1,0,COLORYELLOW),DOT;//昨日收盘均价线
LSETTLE:=REFX1(REF(SETTLE,DAYBARPOS),999);//昨日收盘均价线
NG4:=BACKSET(ISLASTBAR,SUMBARS(DAYBARPOS=1,1));//昨日收盘均价线
昨日收盘均价线:IF(NG4,LSETTLE,NULL),COLORYELLOW,NOTEXT,DOT;//昨日收盘均价线
DRAWNUMBER(ISLASTBAR,LSETTLE,LSETTLE,2,COLORYELLOW),ALIGN0;

文期王华
5楼-- · 01-11 23:38
麻烦老师 2楼和4楼的数字 能不能尽量往最右边的, 我看还有一点点的距离
文华解答
6楼-- · 01-11 23:58
只能在有K线的地方标记,上面写法是能实现的最右了
文期王华
7楼-- · 01-12 00:19
老师麻烦您 , 2楼和4楼,帮我改下,只适用日线级别以下的周期, (日线不适用)