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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件策略编写求助区 → 求助

   

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


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

主题:求助

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


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/7/8 15:04:52 [显示全部帖子]

已经在编写,请耐心等待


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

客户服务部

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

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

service@weistock.com

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

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


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/7/8 15:23:30 [显示全部帖子]

6不好判断一周的最后一天是否交易,也不好判断哪天是一周的最后一天,请楼主自己手动平仓吧.

7.请楼主了解之后自己实现吧

 

//K线走完模式----固定时间间隔会信号消失,推荐用K线走完,

//适用版本:标准版

//适用日线以下周期

 

runmode:0;

variable:lossnum=0;// 全局变量,平仓时判断一下是否亏损,若亏损lossnum就加1

ma60:ma(close,60);

 

if CROSS(close,ma60) and holding<0 and enterbars>0 then

begin

sellshort(1,1,market),orderqueue;

if c>enterprice then lossnum:=lossnum+1;

end

 

if CROSS(close,ma60) and holding=0 and lossnum<5 then

begin

buy(1,1,market),orderqueue;

end

 

if CROSS(ma60,close) and holding>0 and enterbars>0 then

begin

sell(1,1,market),orderqueue;

if c<enterprice then lossnum:=lossnum+1;

end

if CROSS(ma60,close) and holding=0 and lossnum<5 then

begin

buyshort(1,1,market),orderqueue;

end

 

//止损平仓

if holding>0 and enterbars>0 then

begin

sell(low<enterprice-20*mindiff,0,market);

if c<enterprice then lossnum:=lossnum+1;

end

if holding<0 and enterbars>0 then

begin

sellshort(high>enterprice+20*mindiff,0,market);

if c>enterprice then lossnum:=lossnum+1;

end

 

if time=151500 then begin

lossnum:=0;//每天收盘时要重新赋值为0

end

[此贴子已经被作者于2011-7-8 15:29:07编辑过]


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

客户服务部

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

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

service@weistock.com

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

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


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/7/12 10:05:13 [显示全部帖子]

两个或两个以上周期连续上穿或下破时就失真

从信号上看,只会在第一次上穿或下破时开仓或者平仓.

您可以从策略角度,好好在思量思量,完善一下自己的策略.

 

//止赢平仓

if holding>0 and enterbars>0 then

begin

sell(low>enterprice+50*mindiff,0,market);

end

 

if holding<0 and enterbars>0 then

begin

sellshort(high<enterprice-50*mindiff,0,market);

end



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

客户服务部

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

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

service@weistock.com

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

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


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/7/12 14:26:03 [显示全部帖子]

//K线走完模式----固定时间间隔会信号消失,推荐用K线走完,
//适用版本:标准版
//适用日线以下周期

runmode:0;
variable:lossnum=0;// 全局变量,平仓时判断一下是否亏损,若亏损lossnum就加1
ma60:ma(close,60);


if CROSS(close,ma60) and holding<0 and enterbars>0 then
begin
sellshort(1,1,market),orderqueue;
if c>enterprice then lossnum:=lossnum+1;
end

 

if CROSS(close,ma60) and holding=0 and lossnum<5 then
begin
buy(1,1,market),orderqueue;
end

 

if CROSS(ma60,close) and holding>0 and enterbars>0 then
begin
sell(1,1,market),orderqueue;
if c<enterprice then lossnum:=lossnum+1;
end

 

if CROSS(ma60,close) and holding=0 and lossnum<5 then
begin
buyshort(1,1,market),orderqueue;
end

 

//止损平仓
if holding>0 and enterbars>0 and low<enterprice-20*mindiff then
begin
sell(1,0,market);
if c<enterprice then lossnum:=lossnum+1;
end

 

if holding<0 and enterbars>0 and high>enterprice+20*mindiff then
begin
sellshort(1,0,market);
if c>enterprice then lossnum:=lossnum+1;
end

 

//止赢平仓
if holding>0 and enterbars>0 then
begin
多赢:sell(low>enterprice+50*mindiff,0,market);
end

if holding<0 and enterbars>0 then
begin
空赢:sellshort(high<enterprice-50*mindiff,0,market);
end

 

if time=151500 then begin
lossnum:=0;//每天收盘时要重新赋值为0
end



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

客户服务部

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

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

service@weistock.com

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

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


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/7/12 16:47:07 [显示全部帖子]

MA60>REF(60,1)

MA60<REF(60,1)

 

推荐您学习一下编程文档(论坛置顶帖子里有),您想加进去的语句,都是很简单的.

学习掌握了后,加的东西,有了什么问题,也可以自行的调试



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

客户服务部

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

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

service@weistock.com

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

 回到顶部