只保留最后一个文字标注

05-01 13:42发布

MA1:=EMA(C,10);

MA2:=EMA(C,20);

R:=MA1MA2||MA1>MA2&&C>MA1;
G:=MA1MA2&&C
DRAWTEXT(CROSS(R&&C>MA2,0.5),H, '开多');
DRAWTEXT(CROSSDOWN(R,0.5),H, '平多');
DRAWTEXT(CROSS(G&&C
DRAWTEXT(CROSSDOWN(G,0.5),H, '平空');
麻烦老师帮我标注的文字只保留最后一个 是4组同时各保留一个

MA1:=EMA(C,10);
MA2:=EMA(C,20);

R:=MA1MA2||MA1>MA2&&C>MA1;
G:=MA1MA2&&C
DRAWTEXT(CROSS(R&&C>MA2,0.5),H, '开多');
DRAWTEXT(CROSSDOWN(R,0.5),H, '平多');
DRAWTEXT(CROSS(G&&C
DRAWTEXT(CROSSDOWN(G,0.5),H, '平空');
麻烦老师帮我标注的文字只保留最后一个 是4组同时各保留一个

付费偷看设置
发送
9条回答
文华解答
2楼-- · 05-01 14:40

参考:

MA1:=EMA(C,10);

MA2:=EMA(C,20);

R:=MA1MA2||MA1>MA2&&C>MA1;

G:=MA1MA2&&C

T1:=CROSS(R&&C>MA2,0.5)&&EXIST(CROSSDOWN(R,0.5),SUMBARS(CROSS(R&&C>MA2,0.5),2));

T2:=CROSSDOWN(R,0.5)&&EXIST(CROSS(R&&C>MA2,0.5),SUMBARS(CROSSDOWN(R,0.5),2));

T3:=CROSS(G&&C

T4:=CROSSDOWN(G,0.5)&&EXIST(CROSS(G&&C

KTEXT(ISLASTBAR,-BARSLAST(T1),REF(H,BARSLAST(T1)),1,COLORRED,'开多');

KTEXT(ISLASTBAR,-BARSLAST(T2),REF(H,BARSLAST(T2)),1,COLORRED,'平多');

KTEXT(ISLASTBAR,-BARSLAST(T3),REF(L,BARSLAST(T3)),1,COLORGREEN,'开空'),VALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T4),REF(L,BARSLAST(T4)),1,COLORGREEN,'平空'),VALIGN0;

无知无畏
3楼-- · 05-01 14:59
谢谢老师了 再麻烦老师帮我标注相应文字的数值在文字的左边
文华解答
4楼-- · 05-01 15:19

在对应文字处显示该根K线收盘价,参考:

MA1:=EMA(C,10);

MA2:=EMA(C,20);

R:=MA1MA2||MA1>MA2&&C>MA1;

G:=MA1MA2&&C

T1:=CROSS(R&&C>MA2,0.5)&&EXIST(CROSSDOWN(R,0.5),SUMBARS(CROSS(R&&C>MA2,0.5),2));

T2:=CROSSDOWN(R,0.5)&&EXIST(CROSS(R&&C>MA2,0.5),SUMBARS(CROSSDOWN(R,0.5),2));

T3:=CROSS(G&&C

T4:=CROSSDOWN(G,0.5)&&EXIST(CROSS(G&&C

KTEXT(ISLASTBAR,-BARSLAST(T1),REF(H,BARSLAST(T1)),1,COLORRED,'开多'),ALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T2),REF(H,BARSLAST(T2)),1,COLORRED,'平多'),ALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T3),REF(L,BARSLAST(T3)),1,COLORGREEN,'开空'),VALIGN0,ALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T4),REF(L,BARSLAST(T4)),1,COLORGREEN,'平空'),VALIGN0,ALIGN0;

DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T1)+1),0.5),H,C,2,COLORRED),ALIGN2;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T2)+1),0.5),H,C,2,COLORRED),ALIGN2;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T3)+1),0.5),L,C,2,COLORGREEN),VALIGN0,ALIGN2;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T4)+1),0.5),L,C,2,COLORGREEN),VALIGN0,ALIGN2;

无知无畏
5楼-- · 05-01 15:39
谢谢老师 再麻烦
MA1:=EMA(C,10);
MA2:=EMA(C,20);
R:=MA1MA2||MA1>MA2&&C>MA1;
G:=MA1MA2&&C

T1:=CROSS(R&&C>MA2,0.5)&&EXIST(CROSSDOWN(R,0.5),SUMBARS(CROSS(R&&C>MA2,0.5),2));
T2:=CROSSDOWN(R,0.5)&&EXIST(CROSS(R&&C>MA2,0.5),SUMBARS(CROSSDOWN(R,0.5),2));
T3:=CROSS(G&&C
T4:=CROSSDOWN(G,0.5)&&EXIST(CROSS(G&&C

KTEXT (ISLASTBAR,-BARSLAST(T1),REF(H,BARSLAST(T1)),1,COLORRED,'开多'),ALIGN0;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T1)+1),0.5),H,C,2,COLORRED),ALIGN2;

KTEXT(ISLASTBAR,-BARSLAST(T2),REF(H,BARSLAST(T2)),1,COLORRED,'平多'),ALIGN0;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T2)+1),0.5),H,C,2,COLORRED),ALIGN2;

KTEXT(ISLASTBAR,-BARSLAST(T3),REF(L,BARSLAST(T3)),1,COLORGREEN,'开空'),VALIGN0,ALIGN0;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T3)+1),0.5),L,C,2,COLORGREEN),VALIGN0,ALIGN2;

KTEXT(ISLASTBAR,-BARSLAST(T4),REF(L,BARSLAST(T4)),1,COLORGREEN,'平空'),VALIGN0,ALIGN0;
DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T4)+1),0.5),L,C,2,COLORGREEN),VALIGN0,ALIGN2;

//麻烦老师帮我把 开空和相应的数值标注 移动到相应的K线高点
开多和相应的数值标注 移动到相应的K线低点

文华解答
6楼-- · 05-01 16:00

参考:

MA1:=EMA(C,10);

MA2:=EMA(C,20);

R:=MA1MA2||MA1>MA2&&C>MA1;

G:=MA1MA2&&C

T1:=CROSS(R&&C>MA2,0.5)&&EXIST(CROSSDOWN(R,0.5),SUMBARS(CROSS(R&&C>MA2,0.5),2));

T2:=CROSSDOWN(R,0.5)&&EXIST(CROSS(R&&C>MA2,0.5),SUMBARS(CROSSDOWN(R,0.5),2));

T3:=CROSS(G&&C

T4:=CROSSDOWN(G,0.5)&&EXIST(CROSS(G&&C

KTEXT(ISLASTBAR,-BARSLAST(T1),REF(L,BARSLAST(T1)),1,COLORRED,'开多'),VALIGN0,ALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T2),REF(L,BARSLAST(T2)),1,COLORRED,'平多'),VALIGN0,ALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T3),REF(H,BARSLAST(T3)),1,COLORGREEN,'开空'),ALIGN0;

KTEXT(ISLASTBAR,-BARSLAST(T4),REF(H,BARSLAST(T4)),1,COLORGREEN,'平空'),ALIGN0;

DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T1)+1),0.5),L,C,2,COLORRED),VALIGN0,ALIGN2;

DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T2)+1),0.5),L,C,2,COLORRED),VALIGN0,ALIGN2;

DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T3)+1),0.5),H,C,2,COLORGREEN),ALIGN2;

DRAWNUMBER(CROSS(BACKSET(ISLASTBAR,BARSLAST(T4)+1),0.5),H,C,2,COLORGREEN),ALIGN2;

无知无畏
7楼-- · 05-01 16:20
麻烦薄荷老师帮我4组标注的文字和4组标注的数值只保留最后的一组 并且把保留最后一组标注的相应k线变成白色

Copyright © 2021 自动化交易