以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 编程求助! (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=30021) |
|
-- 作者:a290380438 -- 发布时间:2012/10/22 13:59:56 -- 编程求助!
|
|
-- 作者:jinzhe -- 发布时间:2012/10/22 14:04:01 -- ma60:=ma(c,60); if c>ma60 then begin sellshort(holding<0,0,market); buy(holding=0,1,market); end
if c<ma60 then begin sell(holding>0,0,market); buyshort(holding=0,1,market); end
if (c-enterprice)/enterprice>=20% and holding<0 then sellshort(holding<0,0,market);
if (enterprice-c)/c>=20% and holding>0 then sell(holding>0,0,market);
仅供参考,不负责盈亏 请您根据自己交易经验,进行修改后再实际应用 |
|
-- 作者:a290380438 -- 发布时间:2012/10/26 3:26:27 -- 求助 不知是何原因?以下公式测试通不过,文字提示为: 无法识别的算术表达方式。请帮我检测一下。
另请老师帮我把60均线设置成参数。
谢谢!
附公式如下: ma60:=ma(c,60); if c>ma60 then begin sellshort(holding<0,0,market); buy(holding=0,1,market); end
if c<ma60 then begin sell(holding>0,0,market); buyshort(holding=0,1,market); end
if (c-enterprice)/enterprice>=20% and holding<0 then sellshort(holding<0,0,market);
if (enterprice-c)/c>=20% and holding>0 then sell(holding>0,0,market);
|
|
-- 作者:RogarZ -- 发布时间:2012/10/26 8:41:19 -- input:n(60,1,300,10);
ma60:=ma(c,N); if c>ma60 then begin sellshort(holding<0,0,market); buy(holding=0,1,market); end
if c<ma60 then begin sell(holding>0,0,market); buyshort(holding=0,1,market); end
if (c-enterprice)/enterprice>=0.2 and holding<0 then sellshort(holding<0,0,market);
if (enterprice-c)/c>=0.2 and holding>0 then sell(holding>0,0,market); |