五特知识分享网

怎么能把通达信公式导入同花顺

想将同花顺的一个指标导入通达信?

目前是同花顺兼容了通达信的函数库,通达信不支持同花顺的某些函数。periodname,return之类通达信识别不了,日线周期语法需要把periodname换成period==1,你这个需要把日线周期判断和return语句部分代码重写

如何把通达信的公式改成同花顺的公式

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
AA:=CROSS(DIF,DEA) AND DEA>0;
BB:=BARSLAST(CROSS(DEA,DIF)) AND DEA>0; 
CC:=REF(BARSLAST(CROSS(DIF,0))<20,BARSLAST(CROSS(DEA,DIF))+1);
AA AND BB AND CC;

同花顺有通达信模式,可以直接把元公式粘贴进去,不需要修改函数。

通达信公式和同花顺公式之间如何转换

[size=12px]请下次发表指标时附图,将依律加分[/size]
[quote]原帖由 [i]文武双拳[/i] 于 2007-4-3 22:18 发表
[size=12px][size=4]红色烛光选股公式
让你抓住起点,卖出高点
[/size][size=2]Var1:=vol/CAPITAL*100;[/size][/size]
[size=12px][size=2]Var2:=Var1>4 AND CLOSE>REF(CLOSE,1);[/size][/size]
[size=12px][size=2]Var3:=COUNT(Var2,13)>=3;[/size][/size]
[size=12px][size=2]Var4:=HIGH/CLOSE<1.021;[/size][/size]
[size=12px][size=2]SELECT Var3 AND Var4 AND VAR1 AND VAR2[/size][/size]
飞狐
[size=4]红色烛光[/size]
[size=2]Var1:=vol/CAPITAL*100;[/size]
[size=12px][size=2]Var2:=Var1>4 AND CLOSE>REF(CLOSE,1);[/size][/size]
[size=12px][size=2]Var3:=COUNT(Var2,13)>=3;[/size][/size]
[size=12px][size=2]Var4:=HIGH/CLOSE<1.021;[/size][/size]
[size=12px][size=2]Var3 AND Var4 AND VAR1 AND VAR2[/size][/size]
[size=12px][/quote][/size]

如何把通达信自选股导入到同花顺自选股?

挨着挨着的选吧。从新选

通达信指标复制到同花顺提示未定义

DRAWTEXT_FIX(1,0,0,0,'地区:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.05,0,0,DYBLOCK),COLORYELLOW;
所属行业:DRAWTEXT_FIX(1,0,0.08,0,'行业:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.05,0.08,0,HYBLOCK),COLORYELLOW;
所属概念:DRAWTEXT_FIX(1,0,0.16,0,'概念:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.05,0.16,0,GNBLOCK),COLORYELLOW;
所属风格:DRAWTEXT_FIX(1,0,0.24,0,'风格:'),COLORYELLOW;
类似这三个“DYBLOCK” “HYBLOCK” “GNBLOCK”同花顺没有这些函数。

如何把同花顺公式改为通达信公式

RSV1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
K1:=SMA(RSV1,5,1);
D1:=SMA(K1,5,1);
J1:=3*K1-2*D1;
AA1:=EMA(J1,5);
AA2:=REF(AA1,1);
STICKLINE(AA1>AA2,AA1,AA2,8,0),COLOR0055AA;
STICKLINE(AA1>AA2,AA1,AA2,2,0),COLOR0099DD;
STICKLINE(AA1>AA2,AA1,AA2,1,0),COLOR01BEE7;
STICKLINE(AA1<=AA2,AA1,AA2,4,0),COLOR006600;
STICKLINE(AA1<=AA2,AA1,AA2,4,0),COLOR009900;
STICKLINE(AA1<=AA2,AA1,AA2,2,0),COLOR00BB00;
STICKLINE(AA1<=AA2,AA1,AA2,1,0),COLOR00CC00;
RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K2:=SMA(RSV2,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
STICKLINE(BB1>BB2,BB1,BB2,7,0),COLOR000045;
STICKLINE(BB1>BB2,BB1,BB2,2,0),COLOR0000C5;
STICKLINE(BB1>BB2,BB1,BB2,1,0),COLOR0000E5;
STICKLINE(BB1<=BB2,BB1,BB2,4,0),COLOR353500;
STICKLINE(BB1<=BB2,BB1,BB2,3,0),COLOR555500;
STICKLINE(BB1<=BB2,BB1,BB2,2,0),COLOR757500;
STICKLINE(BB1<=BB2,BB1,BB2,1,0),COLOR858500;
DD:=AA1>AA2 AND BB1>BB2;
注意买入:DD AND NOT(REF(DD,1)) AND (AA1<50 OR BB1<50) ,LINETHICK0;
DRAWICON(注意买入,-5,1);
注意卖出:REF(DD,1)=1 AND NOT(DD),LINETHICK0;
DRAWICON(注意卖出,105,2);