以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 一个布林通道,改成后台 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=88290) |
-- 作者:么么 -- 发布时间:2015/12/10 14:31:41 -- 一个布林通道,改成后台 variable:hh=0,ll=0; MID : MA(CLOSE,26); //平空开多--价格下穿上轨 if cross(UPPER,c) then //价格超过开多这根K线的最低点时止损平多 //止盈条件是当价格上穿上轨时止盈平仓 scs:=cross(c,upper); if holding>0 and enterbars>1 then sell(scs,1,market); //平多开空--价格上穿上轨时 if cross(c,UPPER) then //价格超过开空这根K线的最高点时止损平空 //止盈条件是当价格上穿下轨时止盈平仓。 scx:=cross(c,lower); if holding<0 and enterbars>1 then sellshort(scx,1,market); |
-- 作者:jinzhe -- 发布时间:2015/12/10 14:37:36 -- globalvariable:hh=0,ll=0; MID : MA(CLOSE,26); //平空开多--价格下穿上轨 if cross(UPPER,c) then //价格超过开多这根K线的最低点时止损平多 //止盈条件是当价格上穿上轨时止盈平仓 scs:=cross(c,upper); if tholding>0 and tenterbars>1 then tsell(scs,1,mkt); //平多开空--价格上穿上轨时 if cross(c,UPPER) then //价格超过开空这根K线的最高点时止损平空 //止盈条件是当价格上穿下轨时止盈平仓。 scx:=cross(c,lower); if tholding<0 and tenterbars>1 then tsellshort(scx,1,mkt); |