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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件策略编写求助区 → 组合编辑了一个模型,还需整理成真实能用好的策略。

   

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


  共有6267人关注过本帖树形打印复制链接

主题:组合编辑了一个模型,还需整理成真实能用好的策略。

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


加好友 发短信
等级:新手上路 帖子:12 积分:92 威望:0 精华:0 注册:2010/10/20 19:43:44
组合编辑了一个模型,还需整理成真实能用好的策略。  发帖心情 Post By:2011/7/22 16:06:13 [只看该作者]

{均线战法}
INPUT:N1(8,0.01,100,0.05);

VARIABLE:MAXPROFIT=0,{有仓位时最大获利幅度}VMIN = 090000;{用于隔夜高开或低开时间差}                

ma1:ma(c,n1);

runmode:0;
YdZyD:=1,linethick0;   {移动止盈总开关,1为开,0为关}
variable:baramount=0;
variable:barvol=0;

if barpos<=1 then exit;

if date<>date[barpos-1] then begin
 baramount:=amount;
 barvol:=vol;
end else begin
 baramount:=baramount[barpos-1]+amount;
 barvol:=barvol[barpos-1]+vol;
end

averageprice:=baramount/barvol/multiplier;
均价线:round(averageprice/mindiff)*mindiff,linethick2,coloryellow;

a:=open+3*mindiff;
b:=open-3*mindiff;


//建立多头的进场条件
long:=cross(ma1,averageprice);
if long  then
begin
sellshort(holding<0,1,MKT),orderqueue;
buy(holding=0,1,limitr,a),orderqueue,;


end

//建立空头的进场条件
short:=cross(averageprice,ma1);
if short  then
begin
sell(holding>0,1,MKT),orderqueue;
buyshort(holding=0,1,limitr,b),orderqueue;

end

//多移动止盈
 If YdZyD=1 and Enterbars>=0 then begin
  //a.每周期判断是否创新低
if holding > 0 and enterbars > 0 then
begin
 win:=(c-enterprice)/enterprice*100; //记录最大盈利
 if win > maxprofit then
  maxprofit:=win;
  win2:=(maxprofit-win)/maxprofit*100; //最大盈利后的回调幅度
end
end

//b.当开仓后,盈利达到80到380点时,回撤80%,平仓
if c-enterprice>80*mindiff and c-enterprice<380*mindiff and holding>0 then
begin
SELL(win2 >= 20, 1,market);
end


//空移动止盈A
 If YdZyD=1 and Enterbars>=0 then begin
  //a.每周期判断是否创新低
if holding > 0 and enterbars > 0 then
begin
 win:=(c-enterprice)/enterprice*100; //记录最大盈利
 if win > maxprofit then
  maxprofit:=win;
  win2:=(maxprofit-win)/maxprofit*100; //最大盈利后的回调幅度
end
end

//b.当开仓后,盈利达到80到380点时,回撤80%,平仓
if c-enterprice>80*mindiff and c-enterprice<380*mindiff and holding>0 then
begin
SELL(win2 >= 20, 1,market);
end


盈亏:asset,noaxis,colorgray;     
收益:(asset-50000)/50000,linethick0;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;


 回到顶部
帅哥哟,离线,有人找我吗?
董小球
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 大哥
等级:超级版主 帖子:2837 积分:13237 威望:0 精华:2 注册:2010/7/14 17:31:54
  发帖心情 Post By:2011/7/22 16:59:22 [只看该作者]

说说你的想法,已经实现了什么,还有那些地方不足,要改成什么样子,实现什么具体功能?


金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
boss
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:12 积分:92 威望:0 精华:0 注册:2010/10/20 19:43:44
  发帖心情 Post By:2011/7/25 0:03:32 [只看该作者]

其实每次都有机会正收益,但实际运行不理想,保不住收益


 回到顶部
帅哥哟,离线,有人找我吗?
董小球
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 大哥
等级:超级版主 帖子:2837 积分:13237 威望:0 精华:2 注册:2010/7/14 17:31:54
K线不走完就给信号。。。  发帖心情 Post By:2011/7/25 10:00:19 [只看该作者]

。。。。。这个是需要实盘经验来给你修正指标,这个咱是做软件的估计帮助不了你!


金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
蔡宛宏
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:129 积分:473 威望:0 精华:0 注册:2011/12/6 14:06:35
  发帖心情 Post By:2011/12/19 14:14:04 [只看该作者]

模板很不错

 回到顶部