欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 不知道为什没有信号。 请看下

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有4282人关注过本帖平板打印复制链接

主题:不知道为什没有信号。 请看下

帅哥哟,离线,有人找我吗?
tonybig
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 量化投资
等级:论坛游民 帖子:148 积分:653 威望:0 精华:0 注册:2010/9/27 16:08:27
不知道为什没有信号。 请看下  发帖心情 Post By:2011/12/12 16:52:42    Post IP:116.25.169.51[只看该作者]

runmode:0;

input:riskratio(1,0,2,1);
input:atrlength(20,5,30,5);
input:entryperiod(20,5,60,5);
input:exitperiod(10,5,60,5);
input:n(10,5,30,5);
variable:times=0;

atr:=ref(ma(tr,atrlength),1);
marginratio:=10/100;

entryupperband:=ref(hhv(high,entryperiod),1);//上轨
entrylowerband:=ref(llv(low,entryperiod),1);//下轨

exitupperband:=ref(hhv(high,exitperiod),1);//空头止损上轨
exitlowerband:=ref(llv(low,exitperiod),1);//多头止损下轨

entrylongcond:=high>=entryupperband;//最高价突破上轨开多
entryshortcond:=low<=entrylowerband;//最低价突破下轨开空

exitlongcond:=low<=exitlowerband;// 最低价突破多头止损下轨  止损
exitshortcond:=high>=exitupperband;// 最高价突破空头止损上轨  止损

if entrylongcond then buy(holding=0,1,limitr,entryupperband);


 
if entryshortcond then buyshort(holding=0,1,limitr,entrylowerband);
 


if exitlongcond then sell(holding>0,1,exitlowerband);
 
if exitshortcond then sellshort(holding<0,1,exitupperband);

 

不知道为什没有信号。   请看下


 


 回到顶部