编写要求:
KDJ的J金叉K 和 RSI1金叉RSI2 的K线指标颜色能在主图显示
公式在线网解答:
{J金叉K:黄色}
STICKLINE(CROSS("KDJ.J","KDJ.K"),O,C,3,0),COLORYELLOW;
STICKLINE(CROSS("KDJ.J","KDJ.K"),H,L,0,0),COLORYELLOW;
{RSI1金叉RSI2:绿色}
STICKLINE(CROSS("RSI.RSI1","RSI.RSI2"),O,C,3,0),COLORGREEN;
STICKLINE(CROSS("RSI.RSI1","RSI.RSI2"),H,L,0,0),COLORGREEN;
{J金叉K同时RSI1金叉RSI2:绿色K线实体中加上红色}
STICKLINE(CROSS("KDJ.J","KDJ.K") AND CROSS("RSI.RSI1","RSI.RSI2"),O,C,1,0),COLORRED;