MACD在0轴之下时把K线显示空心无色状态
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

解答:

 网友求助:

下面源码中当MACD在0轴之下时把K线显示空心无色状态怎么表示?
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
STICKLINE(DIF>0 AND DEA>0 AND C>O,O,C,3,0),COLORRED;
STICKLINE(DIF>0 AND DEA>0 AND C>O,H,L,0,0),COLORRED;
STICKLINE(DIF>0 AND DEA>0 AND C<O,O,C,3,0),COLORGREEN;
STICKLINE(DIF>0 AND DEA>0 AND C<O,H,L,0,0),COLORGREEN;
STICKLINE(DIF<0 AND DEA<0 AND C>O,O,C,3,0),COLORMAGENTA;
STICKLINE(DIF<0 AND DEA<0 AND C>O,H,L,0,0),COLORMAGENTA;
STICKLINE(DIF<0 AND DEA<0 AND C<O,O,C,3,0),COLORBLUE;
STICKLINE(DIF<0 AND DEA<0 AND C<O,H,L,0,0),COLORBLUE;
 
解答如下:
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
STICKLINE(DIF>0 AND DEA>0 AND C>O,O,C,3,0),COLORRED;
STICKLINE(DIF>0 AND DEA>0 AND C>O,H,L,0,0),COLORRED;
STICKLINE(DIF>0 AND DEA>0 AND C<O,O,C,3,0),COLORGREEN;
STICKLINE(DIF>0 AND DEA>0 AND C<O,H,L,0,0),COLORGREEN;
STICKLINE(DIF<0 AND DEA<0 AND C>O,O,C,3,1),COLORBROWN;
STICKLINE(DIF<0 AND DEA<0 AND C>O,H,L,0,0),COLORBROWN;
STICKLINE(DIF<0 AND DEA<0 AND C<O,O,C,3,1),COLORBROWN;
STICKLINE(DIF<0 AND DEA<0 AND C<O,H,L,0,0),COLORBROWN;

 


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