2指标整合,若干K线内同时出信号标记

02-20 11:58发布

将以下二公式合并,当二公式同时或5根K线之内出现笑脸时显示买,哭脸反之。如单一公式中出现笑哭脸忽略不显买卖。
1公式。
S:=CROSS(CLOSE,EMA2(HIGH,30));

X:=CROSS(EMA2(LOW,30),CLOSE);


WS:=BARSLAST(S)+1;


WX:=BARSLAST(X)+1;


SS:=CROSS(SUM(S,WX),0.5);


XX:=CROSS(SUM(X,WS),0.5);

DRAWICON(SS,LOW,1),VALIGN0,ALIGN2;


DRAWICON(XX,HIGH,2),ALIGN2;


DRAWNUMBER(SS,LOW,(H+L)/2,0,COLORBLACK),ALIGN0,VALIGN0;


DRAWNUMBER(XX,HIGH,(H+L)/2,0,COLORBLACK),ALIGN0;

POLYLINE1(X,L),COLORBLACK;

XX,SOUND('A');


SS,SOUND('B');

公式2

DRAWICON(CROSS(C,SETTLE),H,1);

DRAWICON(CROSSDOWN(C,SETTLE),H,2);

将以下二公式合并,当二公式同时或5根K线之内出现笑脸时显示买,哭脸反之。如单一公式中出现笑哭脸忽略不显买卖。
1公式。
S:=CROSS(CLOSE,EMA2(HIGH,30));

X:=CROSS(EMA2(LOW,30),CLOSE);


WS:=BARSLAST(S)+1;


WX:=BARSLAST(X)+1;


SS:=CROSS(SUM(S,WX),0.5);


XX:=CROSS(SUM(X,WS),0.5);

DRAWICON(SS,LOW,1),VALIGN0,ALIGN2;


DRAWICON(XX,HIGH,2),ALIGN2;


DRAWNUMBER(SS,LOW,(H+L)/2,0,COLORBLACK),ALIGN0,VALIGN0;


DRAWNUMBER(XX,HIGH,(H+L)/2,0,COLORBLACK),ALIGN0;

POLYLINE1(X,L),COLORBLACK;

XX,SOUND('A');


SS,SOUND('B');

公式2

DRAWICON(CROSS(C,SETTLE),H,1);

DRAWICON(CROSSDOWN(C,SETTLE),H,2);

付费偷看设置
发送
1条回答
文华解答
1楼 · 02-20 12:31.采纳回答

参考:

S:=CROSS(CLOSE,EMA2(HIGH,30));
X:=CROSS(EMA2(LOW,30),CLOSE);
WS:=BARSLAST(S)+1;
WX:=BARSLAST(X)+1;
SS:=CROSS(SUM(S,WX),0.5);
XX:=CROSS(SUM(X,WS),0.5);
//DRAWICON(SS,LOW,1),VALIGN0,ALIGN2;
//DRAWICON(XX,HIGH,2),ALIGN2;
DRAWNUMBER(SS,LOW,(H+L)/2,0,COLORBLACK),ALIGN0,VALIGN0;
DRAWNUMBER(XX,HIGH,(H+L)/2,0,COLORBLACK),ALIGN0;
POLYLINE1(X,L),COLORBLACK;
XX,SOUND('A');
SS,SOUND('B');

//DRAWICON(CROSS(C,SETTLE),H,1);
//DRAWICON(CROSSDOWN(C,SETTLE),H,2);

SS1:=SS;
SS2:=CROSS(C,SETTLE);
XX1:=XX;
XX2:=CROSSDOWN(C,SETTLE);

CON1:=SS1 && EXIST(SS2,5) || SS2 && EXIST(SS1,5);
CON2:=XX1 && EXIST(XX2,5) || XX2 && EXIST(XX1,5);

DRAWICON(CON1,L,1),VALIGN0;
DRAWICON(CON2,H,2),VALIGN2;