H均线:=WMA(H,5);
L均线:=WMA(L,5);
WHK涨跌分离线:=IF(C>REF(H均线,1),L均线,IF(C<REF(L均线,1),H均线,L均线));
看多就买:C>WHK涨跌分离线,linethick0,color0000ff;
看空全抛:C<=WHK涨跌分离线,linethick0,color00ff00;
看空周期:=BArslAST(看多就买);
看多周期:=BARSLAST(看空全抛);
开始试买:看多周期=1,color00ffff,linethick0;
全部抛掉:看空周期=1,colorffcc00,linethick0;
止损水平线:=IF(看多周期>看空周期,REF(C,看多周期),REF(C,看空周期));
PARTLINE(止损水平线,看多就买),color0099ff,dotline;
PARTLINE(止损水平线,看空全抛),color00ff00,dotline;
STICKLINE(C>WHK涨跌分离线,H,L,1,0),colorred;
STICKLINE(C>WHK涨跌分离线,O,C,6,0),colorred;
STICKLINE(C>WHK涨跌分离线 AND C<O,O,C,6,1),colorred;
STICKLINE(C<=WHK涨跌分离线,H,L,1,0),color00ff00;
STICKLINE(C<=WHK涨跌分离线,O,C,6,0),color00ff00;
STICKLINE(C<=WHK涨跌分离线 AND C>O,O,C,6,1),color00ff00;
STICKLINE(开始试买,O,(C+O)/2,6,0),color00ffff;
STICKLINE(全部抛掉,O,(C+O)/2,6,0),colorblue;
跨越万年线:=EMA(C,250);
生命线:跨越万年线-(EMA(C,3)-跨越万年线),coloryellow,LINETHICK2;
上浮线:FORCAST(HHV((C+L)/2,1),13),colormagenta;
压力线:IF(crOSS(跨越万年线+0.03,上浮线),H,REF(H,BARSLAST(CROSS(跨越万年线+0.03,上浮线)))),colorgreen;
均价:=((((HIGH + LOW) + OPEN) + CLOSE) / 4);
xB:=((2 * EMA(LLV(均价,88),5)) - 均价);
LC:=REF(CLOSE,1);
止损价位:(LC*1.0035*97+0.2)/99.65,COLORWHITE,dotline;