请金融工程师修改一下,感谢! [金字塔]
咨询内容:
请金融工程师修改成金字塔可以用的语言,感谢!策略源码(Multicharts版本):
inputs:sb(6);
variables:var0(0),var1(0),var2(0),var3(0),var4(0);
var0=Average(close,21);
var1=Average(close,55);
var2=Average(close,120);
var3=BollingerBand(close,21,2);
var4=BollingerBand(close,21,-2);
condition1=var0>var1 and var1>var2 and close>var0;
condition2=var0<var1 and var1<var2 and close<var0;
condition3=var3-var4<var3[1]-var4[1];
if condition1 and condition3 then buy next bar at market;
if condition2 and condition3 then sellshort next bar at market;
sell next bar at var4+sb*(var3[1]-var4[1]) limit;
buytocover next bar at var4-sb*(var3[1]-var4[1]) limit;
sell next bar at var2[1] stop;
If BarsSinceEntry(0)>21 then Sell Next Bar at var1[1] stop;
If BarsSinceEntry(0)>55 then Sell Next Bar at var0[1] stop;
buytocover next bar at var2[1] stop;
If BarsSinceEntry(0)>21 then BuytoCover Next Bar at var1[1] stop;
If BarsSinceEntry(0)>55 then BuytoCover Next Bar at var0[1] stop;
技术交流:
哦
inputs:sb(6);
variables:var0(0),var1(0),var2(0),var3(0),var4(0);
var0=Average(close,21);
var1=Average(close,55);
var2=Average(close,120);
var3=BollingerBand(close,21,2);
var4=BollingerBand(close,21,-2);
condition1=var0>var1 and var1>var2 and close>var0;
condition2=var0<var1 and var1<var2 and close<var0;
condition3=var3-var4<var3[1]-var4[1];
if condition1 and condition3 then buy next bar at market;
if condition2 and condition3 then sellshort next bar at market;
sell next bar at var4+sb*(var3[1]-var4[1]) limit;
buytocover next bar at var4-sb*(var3[1]-var4[1]) limit;
sell next bar at var2[1] stop;
If BarsSinceEntry(0)>21 then Sell Next Bar at var1[1] stop;
If BarsSinceEntry(0)>55 then Sell Next Bar at var0[1] stop;
buytocover next bar at var2[1] stop;
If BarsSinceEntry(0)>21 then BuytoCover Next Bar at var1[1] stop;
If BarsSinceEntry(0)>55 then BuytoCover Next Bar at var0[1] stop;
来源: WWW.CXH99.COM
金字塔资深技术: 抱歉,这个无法处理。
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容