股票论坛
标题:
请高高手把大智慧改为通达信指标,谢谢
[打印本页]
作者:
雄鹰展翅
时间:
2016-5-8 17:18
标题:
请高高手把大智慧改为通达信指标,谢谢
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),COLORwhite;
DEA : EMA(DIFF,9),COLORYELLOW;
MACD : 2*(DIFF-DEA),colorSTICK;
{======================================================}
cond1:=longcross(dea,diff,3);
cond2:=longcross(diff,dea,3);
var1:=barslast(cond1);
var2:=ref(var1,var1+1)+1;
var3:=barslast(cond2);
var4:=ref(var3,var3+1)+1;
var5:=ref(var3,var1)+1;
macdtop1:=ref(hhv(diff,var5),var1);
top1:=ref(hhv(high,var5),var1);
var6:=ref(var3,var1+var2)+1;
macdtop2:=ref(hhv(diff,var6),var1+var2);
top2:=ref(hhv(high,var6),var1+var2);
顶背离0:=top1>top2 and macdtop1<macdtop2;
顶背离:=顶背离0>ref(顶背离0,1);
var7:=ref(var1,var3)+1;
macdbase1:=ref(llv(diff,var7),var3);
base1:=ref(llv(low,var7),var3);
var8:=ref(var1,var3+var4)+1;
macdbase2:=ref(llv(diff,var8),var3+var4);
base2:=ref(llv(low,var8),var3+var4);
底背离0:=base1<base2 and macdbase1>macdbase2;
底背离:=底背离0>ref(底背离0,1);
var9:=barslast(顶背离);
var10:=ref(hhvbars(diff,ref(var3,var9)),var9);
DLTop1:=filter(backset(顶背离,var10+1),var10);
var11:=ref(var1,var9+1)+1;
var12:=ref(hhvbars(diff,ref(var3,var9+var11))+1,var9+var11);
DLTop2:=filter(backset(顶背离,var9+var11+var12),var9+var11+var12);
drawline(DLTop2,diff,DLTop1,diff,0),colorred;
drawicon(顶背离,diff,8),colorgreen,align1,valign2;
var13:=barslast(底背离);
var14:=ref(llvbars(diff,var7),var13);
DLbase1:=filter(backset(底背离,var14+1),var14+3);
var15:=ref(var3,var13+1)+1;
var16:=ref(llvbars(diff,ref(var1,var13+var15))+1,var13+var15);
DLbase2:=filter(backset(底背离,var13+var15+var16),var13+var15+var16);
drawline(dlbase2,diff,dlbase1,diff,0),colorgreen;
drawicon(底背离,diff,7),align1,valign0;
作者:
陪练专家
时间:
2016-5-10 18:57
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE;
DEA : EMA(DIFF,9),COLORYELLOW;
MACD : 2*(DIFF-DEA),COLORSTICK;
{======================================================}
COND1:=LONGCROSS(DEA,DIFF,3);
COND2:=LONGCROSS(DIFF,DEA,3);
VAR1:=BARSLAST(COND1);
VAR2:=REF(VAR1,VAR1+1)+1;
VAR3:=BARSLAST(COND2);
VAR4:=REF(VAR3,VAR3+1)+1;
VAR5:=REF(VAR3,VAR1)+1;
MACDTOP1:=REF(HHV(DIFF,VAR5),VAR1);
TOP1:=REF(HHV(HIGH,VAR5),VAR1);
VAR6:=REF(VAR3,VAR1+VAR2)+1;
MACDTOP2:=REF(HHV(DIFF,VAR6),VAR1+VAR2);
TOP2:=REF(HHV(HIGH,VAR6),VAR1+VAR2);
顶背离0:=TOP1>TOP2 AND MACDTOP1<MACDTOP2;
顶背离:=顶背离0>REF(顶背离0,1);
VAR7:=REF(VAR1,VAR3)+1;
MACDBASE1:=REF(LLV(DIFF,VAR7),VAR3);
BASE1:=REF(LLV(LOW,VAR7),VAR3);
VAR8:=REF(VAR1,VAR3+VAR4)+1;
MACDBASE2:=REF(LLV(DIFF,VAR8),VAR3+VAR4);
BASE2:=REF(LLV(LOW,VAR8),VAR3+VAR4);
底背离0:=BASE1<BASE2 AND MACDBASE1>MACDBASE2;
底背离:=底背离0>REF(底背离0,1);
VAR9:=BARSLAST(顶背离);
VAR10:=REF(HHVBARS(DIFF,REF(VAR3,VAR9)),VAR9);
DLTOP1:=FILTER(BACKSET(顶背离,VAR10+1),VAR10);
VAR11:=REF(VAR1,VAR9+1)+1;
VAR12:=REF(HHVBARS(DIFF,REF(VAR3,VAR9+VAR11))+1,VAR9+VAR11);
DLTOP2:=FILTER(BACKSET(顶背离,VAR9+VAR11+VAR12),VAR9+VAR11+VAR12);
DRAWLINE(DLTOP2,DIFF,DLTOP1,DIFF,0),COLORRED;
DRAWICON(顶背离,DIFF,8),COLORGREEN;
VAR13:=BARSLAST(底背离);
VAR14:=REF(LLVBARS(DIFF,VAR7),VAR13);
DLBASE1:=FILTER(BACKSET(底背离,VAR14+1),VAR14+3);
VAR15:=REF(VAR3,VAR13+1)+1;
VAR16:=REF(LLVBARS(DIFF,REF(VAR1,VAR13+VAR15))+1,VAR13+VAR15);
DLBASE2:=FILTER(BACKSET(底背离,VAR13+VAR15+VAR16),VAR13+VAR15+VAR16);
DRAWLINE(DLBASE2,DIFF,DLBASE1,DIFF,0),COLORGREEN;
DRAWICON(底背离,DIFF,7);
欢迎光临 股票论坛 (http://100000w.com/)
Powered by Discuz! X3.2