在线检测未来函数

通达信解盘机器人指标公式

来源:Internet,编辑:股旁网,2016-05-11

DIF:=EMA(CLOSE,9)-EMA(CLOSE,26);
DEA:=EMA(DIF,12);
macd:=(DIF-DEA)*2,COLORSTICK;
T1:=BARSLAST(crOSS(DIF,0)=1);
T2:=BARSLAST(CROSS(0,DIF)=1);
LLV1:=LLV(L,T2);
HHV1:=HHV(H,T1);
UP:=IF(DATE<=1160601,DRAWLINE(L=LLV1,LLV1,H=HHV1,HHV1,0),DRAWNULL),COLORLIRED;
DN:=IF(DATE<=1160601,DRAWLINE(H=HHV1,HHV1,L=LLV1,LLV1,0),DRAWNULL),COLORGREEN;
低点:=REF(L,BARSLAST(L=DN));
高点:=REF(H,BARSLAST(H=UP));
本低:=IF(DATE<=1160601,低点,DRAWNULL),LINETHICK0;
本高:=IF(DATE<=1160601,高点,DRAWNULL),LINETHICK0;
点位置:=本低>0&&REF(本高,1)>0&&DN=本低;
高点位置:=本高>0&&REF(本低,1)>0&&本高=UP;
上低:=IF(DATE<=1160601,REF(低点,T2+1),DRAWNULL),LINETHICK0;
上高:=IF(DATE<=1160601,REF(高点,T1+1),DRAWNULL),LINETHICK0;
SZ:=上低<本低;
XD:=上高>本高&&上低>本低;
PZ:=(SZ!=1&&XD!=1);
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 100),5),NODRAW;
AK:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 50),13);
DD:=EMA(((0.667*REF(AK1,1))+(0.333*AK1)),2);
CC:=AK1>=DD;
KC:=AK1<DD;
DRAWTEXT_FIX(CURRBARSCOUNT=1&&XD=1,0.55,0.1,0,'趋势下跌');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&SZ=1,0.55,0.1,0,'趋势上涨');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&PZ=1,0.55,0.1,0,'趋势盘整');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&KC=1,0.8,0.1,0,' 策略减仓50%');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&CC=1&&SZ=1,0.8,0.1,0,' 策略:满仓轮动');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&CC=1&&PZ=1,0.8,0.1,0,' 策略:半仓轮动');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&CC=1&&XD=1,0.8,0.1,0,' 策略:二成轮动');
MC:=IF(CC=1&&SZ=1,1,0);
BC:=IF(CC=1&&PZ=1,0.5,0);
ER:=IF(CC=1&&XD=1,0.2,0);
持仓仓位:MC+BC+ER,NODRAW;
STICKLINE(C>0,0,(MC+BC+ER),1,1);
T低:=BARSLAST(AK1<20),NODRAW;
T高:=BARSLAST(AK1>80),NODRAW;
超跌:=IF(T低<T高&&LLV(AK1,T高)<20,1,0),NODRAW;
超买:=IF(T低>T高&&HHV(AK1,T低)>80,1,0),NODRAW;
DRAWTEXT_FIX(CURRBARSCOUNT=1&&AK1<80&&AK1>20&&超跌=1,0.65,0.1,0,' 机会:待涨');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&AK1>20&&AK1<80&&超跌=0,0.65,0.1,0,' 机会:超短');
DRAWTEXT_FIX(CURRBARSCOUNT=1&&AK1<20,0.65,0.1,0,' 机会:波段建仓');
DRAWTEXT_FIX(CURRBARSCOUNT=1&& AK1>80,0.65,0.1,0,' 机会:短线');
风险估值:INTPART(AK1)/100,COLORRED;

通达信解盘机器人指标公式

相关文章