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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件金字塔软件问题提交 → 请问高手:我的介入价止损代码对不对,是不是这样写

   

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


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

主题:请问高手:我的介入价止损代码对不对,是不是这样写

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


加好友 发短信
等级:新手上路 帖子:4 积分:40 威望:0 精华:0 注册:2012/5/8 18:02:41
请问高手:我的介入价止损代码对不对,是不是这样写  发帖心情 Post By:2012/5/9 10:34:24 [显示全部帖子]

//建立多头的进场条件
long :=VBuy and time>=092700 and time<=150000;

if long then
 begin
 sellshort(holding < 0, 0, limitr, open);
 buy(holding = 0, 1, limitr, open);
 Price:=AVGENTERPRICE;//持仓价位
 SELL(HOLDING>0,HOLDING,Stopr,Price*0.9977);//止损
 end
//Price:=AVGENTERPRICE;//持仓价位
//画出多头的止损线
partline(holding>0,Price*0.9977,colorred);

//开空条件
short := VSell and time >= 092700 and time <= 150000;

if short then
 begin
 sell(holding > 0, 0, limitr, open);
 buyshort(holding = 0, 1, limitr, open);
 Price:=AVGENTERPRICE;//持仓价位
 sellshort(holding > 0, 0, Stopr,Price*1.0027);
 end

//画出空头的止损线
partline(holding<0, Price*1.0027, colorgreen);

//收盘前5分钟平仓
if time >= 151200 then
 begin
 sell(holding > 0, 0, limitr, open);
 sellshort(holding < 0, 0, limitr, open);
 end



查看使用道具详细信息
获赠金币帖,共获得 0 个金币
 回到顶部