想在K线上加一条16天均线,K线(在其上为红色其下变绿色)
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

解答:

网友求助:

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

MA20:=MA(CLOSE,16);
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;
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;

 

 


选股票看什么指标最好 >股票指标网