如何增加16天K线且线上为红色,线下为绿色_指标公式答疑

股票

如何增加16天K线且线上为红色,线下为绿色
发表时间:2013-11-14 07:40来源:股票指标网
  • 本文来源: http://www.gupiaoff.com/dayi/2013111427275.html
  • 网友求助:

    想在K线上加一条16天均线,但我想K线变成以下 ,K线在16天上为红色,下面为绿色

    MA20:=MA(CLOSE,16);{000001ZX.coM};
    STICKLINE(O>C AND C>MA20,O,C,2,0),colorred;
    STICKLINE(O>C AND C>MA20,L,H,0.5,0),colorred;
    STICKLINE(O<C AND C>MA20,O,C,2,0),colorred;
    STICKLINE(O<C AND C>MA20,C,H,0.5,0),colorred;
    STICKLINE(O<C AND C>MA20,O,L,0.5,0),colorred;
    STICKLINE(O=C AND C>MA20,O,C,2,0),colorred;
    STICKLINE(O=C AND C>MA20,L,H,0.5,0),colorred;
    STICKLINE(O>C AND C<MA20,O,C,2,0),colorblue;
    STICKLINE(O>C AND C<MA20,L,H,0.5,0),colorblue;
    STICKLINE(O<C AND C<MA20,O,C,2,0),colorblue;
    STICKLINE(O<C AND C<MA20,C,H,0.5,0),colorblue;
    STICKLINE(O<C AND C<MA20,O,L,0.5,0),colorblue;
    STICKLINE(O=C AND C<MA20,O,C,2,0),colorblue;
    STICKLINE(O=C AND C<MA20,L,H,0.5,0),colorblue;

    解答如下:

    MA20:MA(CLOSE,16),COLORGREEN,LINETHICK2;
    IF(C>=MA20,MA20,DRAWNULL),COLORRED,LINETHICK2;
    STICKLINE(O>C AND C>MA20,O,C,2,0),COLORRED;
    STICKLINE(O>C AND C>MA20,L,H,0,0),COLORRED;
    STICKLINE(O<C AND C>MA20,O,C,2,0),COLORRED;
    STICKLINE(O<C AND C>MA20,C,H,0,0),COLORRED;
    STICKLINE(O<C AND C>MA20,O,L,0,0),COLORRED;
    STICKLINE(O=C AND C>MA20,O,C,2,0),COLORRED;
    STICKLINE(O=C AND C>MA20,L,H,0,0),COLORRED;
    STICKLINE(O>C AND C<MA20,O,C,2,0),COLORBLUE;
    {000001ZX.coM};STICKLINE(O>C AND C<MA20,L,H,0,0),COLORBLUE;
    STICKLINE(O<C AND C<MA20,O,C,2,0),COLORBLUE;
    STICKLINE(O<C AND C<MA20,C,H,0,0),COLORBLUE;
    STICKLINE(O<C AND C<MA20,O,L,0,0),COLORBLUE;
    STICKLINE(O=C AND C<MA20,O,C,2,0),COLORBLUE;
    STICKLINE(O=C AND C<MA20,L,H,0,0),COLORBLUE;