以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://www.weistock.com/bbs/list.asp?boardid=4) ---- 求助 (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=75646) |
-- 作者:qqxc50 -- 发布时间:2015/2/13 15:20:44 -- 求助 如果当前周期的K线在本周期收盘时,朝有利于我的方向走了2ATR,则在收盘时平掉一半仓位。这个怎么编写? |
-- 作者:jinzhe -- 发布时间:2015/2/13 15:27:09 -- aa:=stkindi(\'\',\'atr.atr\',0,datatype); if holding>0 and c>=enterprice+2*aa then sell(1,50%,marketr); if holding<0 and c<=enterprice-2*aa then sellshort(1,50%,marketr); |