mtm:=C-REF(C,1);
主力做多:100*Ema(ema(MTM,12),12)/EMA(EMA(Abs(MTM),12),12),COLORRED;
多空趋势线:MA(主力做多,6),COLORBLUE;
能量:=主力做多-多空趋势线,COLORBLacK;
持仓:能量,COLORWHITE;
STICKLINE( UPNDAY(能量,1)AND UPNDAY(主力做多,1),能量 ,0,2.9,0)COLORWHITE;
STICKLINE( UPNDAY(能量,1)AND UPNDAY(主力做多,1),能量 ,0,2,0)COLORLICYAN;
STICKLINE( UPNDAY(能量,1)AND UPNDAY(主力做多,1),能量,0,0.5,0)COLORRED;
STICKLINE( UPNDAY(能量,1)AND DOWNNDAY(主力做多,1),能量 ,0,2.9,0),COLORBROWN;
STICKLINE( UPNDAY(能量,1)AND DOWNNDAY(主力做多,1),能量,0,1,0),COLORBLACK;
STICKLINE( UPNDAY(能量,1)AND DOWNNDAY(主力做多,1),能量 ,0,0.5,0)COLORRED;
STICKLINE( DOWNNDAY(能量,1),能量 ,0,2.9,0),COLORBROWN;
STICKLINE( DOWNNDAY(能量,1),能量,0,1,0),COLORBLACK;
STICKLINE( DOWNNDAY(能量,1),能量 ,0,0.5,0)COLORRED;
{DRAWICON(crOSS(主力做多,多空趋势线),多空趋势线,1);
DRAWICON(CROSS(多空趋势线,主力做多),多空趋势线,2);
}
DRAWICON(UPNDAY(能量,1)AND UPNDAY(主力做多,1) AND UPNDAY(多空趋势线,1),多空趋势线,1);
DRAWICON(CROSS(多空趋势线,主力做多),多空趋势线,2);