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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请帮忙

   

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


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

主题:请帮忙

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


加好友 发短信
等级:管理员 帖子:26631 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2017/12/22 12:35:06    Post IP:180.169.30.6[显示全部帖子]

variable:num_d=0,num_k=0;

if kd=10 and holding<0 then sellSHORT(1,holding,marketr);
if (kk=10 or kkkk=10) and holding>0 then sell(1,holding,marketr);

if openprofit<-10000 and holding>0 then
begin
sell(1,holding,marketr);
num_d:=1;
end
if openprofit<-10000 and holding<0 then
begin
sellshort(1,holding,marketr);
num_k:=1;
end

if num_d=1 and KK=10 then
begin
 buy(1,1,marketr);
 num_d:=0;
end

if num_k=1 and (kk=10 or kkkk=10) then
begin
 buyshort(1,1,marketr);
 num_k:=0;
end



编程无捷径,技巧靠积累。
 回到顶部
帅哥哟,离线,有人找我吗?
wenarm
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:26631 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2017/12/25 8:21:18    Post IP:180.169.30.6[显示全部帖子]

VARIABLE:buy_flag=0,short_flag=0;
if kd=10 and holding<0 then sellSHORT(1,holding,marketr);
if (kk=10 or kkkk=10) and holding>0 then sell(1,holding,marketr);

if openprofit<-10000 and holding>0 then
begin
sell(1,holding,marketr);
buy_flag:=1;
end
if openprofit<-10000 and holding<0 then
begin
sellshort(1,holding,marketr);
short_flag:=1;
end

if buy_flag=0 and KD=10 then
begin
 buy(1,1,marketr);
 short_flag:=0;
end

if short_flag=0 and (kk=10 or kkkk=10) then
begin
 buyshort(1,1,marketr);
 buy_flag:=0;
end



编程无捷径,技巧靠积累。
 回到顶部