同花顺指标编写的问题,等高手

2024-12-03 14:01:54
推荐回答(3个)
回答1:

公式如下:

MA5: MA(C,5);
MA10: MA(C,10);
MA20: MA(C,20);
MA60: MA(C,60);
MA120:MA(C,120);

A1:=C>MA(C,60) AND C>MA(C,120) AND MA(C,60)>MA(C,120);
buy:=CROSS(MA(C,5),MA(C,20));
sell:=CROSS(MA(C,10),C);

DRAWTEXT(A1 AND buy, LOW, '买');
DRAWTEXT(A1 AND sell, HIGH, '卖');

//改指标可直接粘贴到新建公式中使用,我已检验过,没有问题!

回答2:

MA1:MA(C,5);
MA2:MA(C,10);
MA3:MA(C,20);
MA4:MA(C,60);
MA5:MA(C,120);
A1:=C>MA(C,20) AND C>MA(C,120);
A2:=CROSS(MA(C,5),MA(C,20));
A3:=CROSS(MA(C,10),C);

DRAWTEXT(A1,L,'买');
DRAWTEXT(A2,H,'卖');

回答3:

MA1:MA(C,5);
MA2:MA(C,10);
MA3:MA(C,20);
MA4:MA(C,60);
MA5:MA(C,120);
bb:=C>MA(C,20) AND C>MA(C,120) AND CROSS(MA(C,5),MA(C,20));
ss:=CROSS(MA(C,10),C);

DRAWTEXT(bb,L,'买');
DRAWTEXT(ss,H,'卖');