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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 一个布林通道,改成后台

   

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


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

主题:一个布林通道,改成后台

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
一个布林通道,改成后台  发帖心情 Post By:2015/12/10 14:31:41    Post IP:124.152.32.98[显示全部帖子]

 

variable:hh=0,ll=0;

MID : MA(CLOSE,26);
UPPER:MID + 2*STD(CLOSE,26);
LOWER:MID - 2*STD(CLOSE,26);

//平空开多--价格下穿上轨

if cross(UPPER,c) then
begin
sellshort(holding<0,1,market);
if holding=0 then
begin
buy(1,1,market);
ll:=low;
end
end

//价格超过开多这根K线的最低点时止损平多
if holding>0 and enterbars>1 then sell(c<ll,1,market);

//止盈条件是当价格上穿上轨时止盈平仓

scs:=cross(c,upper);

if holding>0 and enterbars>1 then sell(scs,1,market);

//平多开空--价格上穿上轨时

if cross(c,UPPER) then
begin
sell(holding>0,1,market);
if holding=0 then
begin
buyshort(1,1,market);
hh:=high;
end
end

//价格超过开空这根K线的最高点时止损平空
if holding<0 and enterbars>1 then sellshort(c>hh,1,market);

//止盈条件是当价格上穿下轨时止盈平仓。

scx:=cross(c,lower);

if holding<0 and enterbars>1 then sellshort(scx,1,market);



 回到顶部