将强弱势公式及趋势信号改为通达信公式
2020/1/12 18:34:20
公式编写说明:
请老师将强弱势公式及趋势信号改为通达信公式强弱势公式源码:A1:=(EMA(((O+H+L+C)/4),3)+EMA(((O+H+L+C)/4),6)+EMA(((O+H+L+C)/4),9))/3;A2:=(EMA(((O+H+L+C)/4),5)+EMA(((O+H+L+C)/4),10)+EMA(((O+H+L+C)/4),20))/3;A3:=(EMA(((O+H+L+C)/4),7)+EMA(((O+H+L+C)/4),14)+EMA(((O+H+L+C)/4),28))/3;A4:=(EMA(((O+H+L+C)/4),9)+EMA(((O+H+L+C)/4),18)+EMA(((O+H+L+C)/4),36))/3;A5:=(EMA(((O+H+L+C)/4),11)+EMA(((O+H+L+C)/4),22)+EMA(((O+H+L+C)/4),44))/3;A6:=(EMA(((O+H+L+C)/4),13)+EMA(((O+H+L+C)/4),26)+EMA(((O+H+L+C)/4),52))/3;A7:=(EMA(((O+H+L+C)/4),21)+EMA(((O+H+L+C)/4),34)+EMA(((O+H+L+C)/4),68))/3;b1:PARTLINE(A1>REF(A1,1),FORCAST(A1,6)),NOTDRAWTEXT,COLORRED,2;b2:PARTLINE(A1<REF(A1,1),FORCAST(A1,6)),NOTDRAWTEXT,COLORGREEN,2;b3:PARTLINE(A2>REF(A2,1),FORCAST(A2,6)),NOTDRAWTEXT,COLORRED,2;b4:PARTLINE(A2<REF(A2,1),FORCAST(A2,6)),NOTDRAWTEXT,COLORGREEN,2;b5:PARTLINE(A3>REF(A3,1),FORCAST(A3,6)),NOTDRAWTEXT,COLORRED,2;b6:PARTLINE(A3<REF(A3,1),FORCAST(A3,6)),NOTDRAWTEXT,COLORGREEN,2;b7:PARTLINE(A4>REF(A4,1),FORCAST(A4,6)),NOTDRAWTEXT,COLORRED,2;b8:PARTLINE(A4<REF(A4,1),FORCAST(A4,6)),NOTDRAWTEXT,COLORGREEN,2;b9:PARTLINE(A5>REF(A5,1),FORCAST(A5,6)),NOTDRAWTEXT,COLORRED,2;b10:PARTLINE(A5<REF(A5,1),FORCAST(A5,6)),NOTDRAWTEXT,COLORGREEN,2;b11:PARTLINE(A6>REF(A6,1),FORCAST(A6,6)),NOTDRAWTEXT,COLORRED,2;b12:PARTLINE(A6<REF(A6,1),FORCAST(A6,6)),NOTDRAWTEXT,COLORGREEN,2;b13:PARTLINE(A7>REF(A7,1),FORCAST(A7,6)),NOTDRAWTEXT,COLORRED,0,3;b14:PARTLINE(A7<REF(A7,1),FORCAST(A7,6)),NOTDRAWTEXT,COLORGREEN,0,3;towerc:=FORCAST(EMA((3*C+2*O+H+L)/7,3),6);directionmax:=MAX(REF(towerc,1),REF(towerc,1));d1:STICKLINE(towerc>=REF(towerc,1),towerc,directionmax,6,0),NOTDRAWTEXT,RGB(253,190,2);d2:STICKLINE(towerc>=REF(towerc,1),towerc,directionmax,5,0),NOTDRAWTEXT,RGB(253,150,2);d3:STICKLINE(towerc>=REF(towerc,1),towerc,directionmax,4,0),NOTDRAWTEXT,RGB(253,110,2);d4:STICKLINE(towerc>=REF(towerc,1),towerc,directionmax,3,0),NOTDRAWTEXT,RGB(253,70,2);d5:STICKLINE(towerc>=REF(towerc,1),towerc,directionmax,2,0),NOTDRAWTEXT,RGB(253,30,2);d6:STICKLINE(towerc>=REF(towerc,1),towerc,directionmax,1,0),NOTDRAWTEXT,RGB(253,0,2);d7:STICKLINE(towerc<REF(towerc,1),towerc,directionmax,6,0),NOTDRAWTEXT,RGB(0,136,0);d8:STICKLINE(towerc<REF(towerc,1),towerc,directionmax,5,0),NOTDRAWTEXT,RGB(0,153,0);d9:STICKLINE(towerc<REF(towerc,1),towerc,directionmax,4,0),NOTDRAWTEXT,RGB(0,170,0);d10:STICKLINE(towerc<REF(towerc,1),towerc,directionmax,3,0),NOTDRAWTEXT,RGB(0,187,0);d11:STICKLINE(towerc<REF(towerc,1),towerc,directionmax,2,0),NOTDRAWTEXT,RGB(0,204,0);d12:STICKLINE(towerc<REF(towerc,1),towerc,directionmax,1,0),NOTDRAWTEXT,RGB(0,221,0);趋势信号源码:CC:=IF(WEEKDAY=4,C,1);b1:=EMA(CLOSE,11);b2:=EMA(CLOSE,21);b3:=EMA(CLOSE,15);a1:IF(Cc=1,REF(b1,BARSLAST(Cc<>1)),REF(b1,BARSLAST(Cc=1))),NOTDRAWTEXT,COLORRED,0,3;a2:partline(Cc=1 and b1>=b2,REF(b3,BARSLAST(Cc<>1))),NOTDRAWTEXT,COLORRED,0,2;a3:partline(cc<>1 and b11 and b1公式源码示例:
a1:=(ema(((o+h+l+c)/4),3)+ema(((o+h+l+c)/4),6)+ema(((o+h+l+c)/4),9))/3;
a2:=(ema(((o+h+l+c)/4),5)+ema(((o+h+l+c)/4),10)+ema(((o+h+l+c)/4),20))/3;
a3:=(ema(((o+h+l+c)/4),7)+ema(((o+h+l+c)/4),14)+ema(((o+h+l+c)/4),28))/3;
a4:=(ema(((o+h+l+c)/4),9)+ema(((o+h+l+c)/4),18)+ema(((o+h+l+c)/4),36))/3;
a5:=(ema(((o+h+l+c)/4),11)+ema(((o+h+l+c)/4),22)+ema(((o+h+l+c)/4),44))/3;
a6:=(ema(((o+h+l+c)/4),13)+ema(((o+h+l+c)/4),26)+ema(((o+h+l+c)/4),52))/3;
a7:=(ema(((o+h+l+c)/4),21)+ema(((o+h+l+c)/4),34)+ema(((o+h+l+c)/4),68))/3;
b1:if(a1>ref(a1,1),forcast(a1,6),drawnull),colorred;
b2:if(a1<ref(a1,1),forcast(a1,6),drawnull),colorgreen;
b3:if(a2>ref(a2,1),forcast(a2,6),drawnull),colorred;
b4:if(a2<ref(a2,1),forcast(a2,6),drawnull),colorgreen;
b5:if(a3>ref(a3,1),forcast(a3,6),drawnull),colorred;
b6:if(a3<ref(a3,1),forcast(a3,6),drawnull),colorgreen;
b7:if(a4>ref(a4,1),forcast(a4,6),drawnull),colorred;
b8:if(a4<ref(a4,1),forcast(a4,6),drawnull),colorgreen;
b9:if(a5>ref(a5,1),forcast(a5,6),drawnull),colorred;
b10:if(a5<ref(a5,1),forcast(a5,6),drawnull),colorgreen;
b11:if(a6>ref(a6,1),forcast(a6,6),drawnull),colorred;
b12:if(a6<ref(a6,1),forcast(a6,6),drawnull),colorgreen;
b13:if(a7>ref(a7,1),forcast(a7,6),drawnull),colorred;
b14:if(a7<ref(a7,1),forcast(a7,6),drawnull),colorgreen;
towerc:=forcast(ema((3*c+2*o+h+l)/7,3),6);
directionmax:=max(ref(towerc,1),ref(towerc,1));
d1:stickline(towerc>=ref(towerc,1),towerc,directionmax,3,0),color02befd;
d2:stickline(towerc>=ref(towerc,1),towerc,directionmax,2.5,0),color0296fd;
d3:stickline(towerc>=ref(towerc,1),towerc,directionmax,2,0),color026efd;
d4:stickline(towerc>=ref(towerc,1),towerc,directionmax,1.5,0),color0246fd;
d5:stickline(towerc>=ref(towerc,1),towerc,directionmax,1,0),color021efd;
d6:stickline(towerc>=ref(towerc,1),towerc,directionmax,0.5,0),color0200fd;
d7:stickline(towerc<ref(towerc,1),towerc,directionmax,3,0),color008800;
d8:stickline(towerc<ref(towerc,1),towerc,directionmax,2.5,0),color009900;
d9:stickline(towerc<ref(towerc,1),towerc,directionmax,2,0),color00aa00;
d10:stickline(towerc<ref(towerc,1),towerc,directionmax,1.5,0),color00bb00;
d11:stickline(towerc<ref(towerc,1),towerc,directionmax,1,0),color00cc00;
d12:stickline(towerc<ref(towerc,1),towerc,directionmax,0.5,0),color00dd00;
===========================================================================
cc:=if(weekday=4,c,1);
b1:=ema(c,11);
b2:=ema(c,21);
b3:=ema(c,15);
a1:if(cc=1,ref(b1,barslast(cc!=1)),ref(b1,barslast(cc=1))),colorred;
a2:if(cc=1 and b1>=b2,ref(b3,barslast(cc!=1)),drawnull),colorred;
a3:if(cc!=1 and b1<b2,hhv(b2,30),drawnull),coloryellow;
a4:drawicon(cc!=1 and b1<b2,hhv(b2,30),9);
看股吧公 式 w ww.kanguba.com
其它股票公式列表