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


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

   

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


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

主题:交易信号不能显示

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


加好友 发短信
等级:新手上路 帖子:4 积分:4 威望:0 精华:0 注册:2012/3/26 9:37:08
交易信号不能显示  发帖心情 Post By:2012/3/26 10:05:15 [只看该作者]

我是一个新手,正在进行写代码练习,但是我在金字塔2.82下写了一个段简单的代码,为什么不能在图标上显示出来?编译没有错误,我实在不知道错在哪里,请帮我找出来。

 

//×?±??D??±?á?
cond1:="kdj.j"<35 and "kdj.k"<35 and "kdj.d"<35;


//?a?à
if time>093000 and time<145000 then
 begin
  if cond1 and cross("kdj.j","kdj.d") then
   begin
   sellshort(holding<0,0,thisclose);
   buy(0,1,thisclose);
   end
 end
 
//?1?e
if thisclose=(enterprice-0.2*25) then
 sell(holding>0,0,thisclose);
 

//???à
if time>093000 and time<145000 and  "kdj.j">100 then
 sell(holding>0,0,thisclose);
   
//ê??ì
if time=145500 then
 begin
 sell(holding,0,market);
 sellshort(holding,0,market);
 end


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


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2012/3/26 11:03:08 [只看该作者]

代码当中都是乱码啊

 

[此贴子已经被作者于2012-3-26 11:03:25编辑过]

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


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2012/3/26 11:13:22 [只看该作者]

客服正在处理

 


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


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2012/3/26 12:40:42 [只看该作者]

//?á??à??D???à?¨¢?
cond1:="kdj.j"<35 and "kdj.k"<35 and "kdj.d"<35;


//?a?¨¤
if time>093000 and time<145000 then
 begin
  if cond1 and cross("kdj.j","kdj.d") then
   begin
   sellshort(holding<0,0,thisclose);
   buy(1,1,thisclose);
   end
 end
 
//?1?e
if thisclose=(enterprice-0.2*25) then
 sell(holding>0,0,thisclose);
 

//???¨¤
if time>093000 and time<145000 and  "kdj.j">100 then
 sell(holding>0,0,thisclose);
  
//¨o??¨?
if time=145500 then
 begin
 sell(holding,0,market);
 sellshort(holding,0,market);
 end

 

 

 

 

你buy语句中第一个值为0,就说明条件永远不成立,永远都不执行buy语句;试试以上代码,就能出信号了

另外最小变动价位你可以直接用mindiff来替代哦

[此贴子已经被作者于2012-3-26 12:41:33编辑过]

 回到顶部