以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- [求助]我是第一次接触程序化,请导一些问题? (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=144080) |
-- 作者:程序学习者 -- 发布时间:2016/12/5 13:53:45 -- [求助]我是第一次接触程序化,请导一些问题? 1、问题1,开盘价格大于2300时,开仓做多。开盘价格小于2100时,开仓做空。公式如何写? 2、问题2,以开盘价格做为条件,如果开盘价格点在昨天的收盘价之上,开多单。 如果开盘价格点在昨天的收盘价之下,开空单。 |
-- 作者:jinzhe -- 发布时间:2016/12/5 14:15:22 -- 1. if open<2300 then buy(holding=0,1,market); if open<2100 then buyshort(holding=0,1,market); 2. if open>ref(close,todaybar) then buy(holding=0,1,market); if open<ref(close,todaybar) then buyshort(holding=0,1,market); |