老师,这个可以改成文华吗? [文华财经]
- 咨询内容:
老师,这个可以改成文华吗?[IntrabarOrderGeneration=true];Inputs:X(10);
variable:var1(0),var2(0),var3(0),var4(0),var5(0),var6(0),var7(0);
if date<>date[1] then begin
var1=Open;
var2=Open+X;
var3=open-X;
var4=Open+2*X;
var5=open-2*X;
tl_new(date,900,var1,date,2300,var1);
tl_new(date,900,var2,date,2300,var2);
tl_new(date,900,var3,date,2300,var3);
tl_new(date,900,var4,date,2300,var4);
tl_new(date,900,var5,date,2300,var5);
end;
condition1=Close cross over var1;
condition2=Close cross over var2;
condition3=Close cross over var3;
condition4=Close cross over var4;
condition5=Close cross under var1;
condition6=Close cross under var2;
condition7=Close cross under var3;
condition8=Close cross under var5;
if marketposition=0 and condition2 then sellshort next bar at market;
if condition4 and var6=0 then sellshort next bar at market;var6=1;
if marketposition<0 and condition6 then buytocover next bar at market;var6=0;
if marketposition<0 and condition5 then buytocover next bar at market;
if marketposition=0 and condition7 then buy next bar at market;
if condition8 and var7=0 then buy next bar at market;var7=1;
if marketposition>0 and condition3 then sell next bar at market;var7=0;
if marketposition>0 and condition1 then sell next bar at market; - 文华技术人员:
参考:
N:=BARSLAST(DATE<>REF(DATE,1))+1;
OO:=VALUEWHEN(N=1,O);
X:=10;
VAR1:OO;
VAR2:OO+X;
VAR3:OO-X;
VAR4:OO+2*X;
VAR5:OO-2*X;
CONDITION1:=CROSS(C,VAR1);
CONDITION2:=CROSS(C,VAR2);
CONDITION3:=CROSS(C,VAR3);
CONDITION4:=CROSS(C,VAR4);
CONDITION5:=CROSSDOWN(C,VAR1);
CONDITION6:=CROSSDOWN(C,VAR2);
CONDITION7:=CROSSDOWN(C,VAR3);
CONDITION8:=CROSSDOWN(C,VAR5);
CONDITION2,SK;
CONDITION4,SK;
CONDITION6,BP;
CONDITION5,BP;
CONDITION7,BK;
CONDITION8,BK;
CONDITION3,SP;
CONDITION1,SP;
AUTOFILTER; - 文华客服:
- 网友回复:
参考2楼回复
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容