以文本方式查看主题
- 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp)
-- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4)
---- 请老师:给改成后台程序吧! (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=75863)
|
-- 作者:FJ6008
-- 发布时间:2015/2/25 16:10:24
-- 请老师:给改成后台程序吧!
if c>zz and c>qs then begin sellshort(holding<0,SS,MARKET),orderqueue; buy(holding=0,SS,limitr,(open)),orderqueue,; end if c<zz and c<qs then begin sell(holding>0,SS,MARKET),orderqueue; buyshort(holding=0,SS,limitr,(open)),orderqueue; end if time>151300 then begin 收盘平空:SELLSHORT(HOLDING<0,HOLDING,market); 收盘平多:SELL(HOLDING>0,HOLDING,market); end
|
-- 作者:FJ6008
-- 发布时间:2015/2/25 16:14:58
--
谢谢老师!
|
-- 作者:jinzhe
-- 发布时间:2015/2/25 16:18:39
--
if c>zz and c>qs then begin sellshort(tholding<0,SS,mkt),orderqueue; buy(tholding=0,SS,lmt,o),orderqueue,; end if c<zz and c<qs then begin sell(tholding>0,SS,MARKET),orderqueue; buyshort(tholding=0,SS,lmt,o),orderqueue; end if time>151300 then begin 收盘平空:tSELLSHORT(HOLDING<0,0,mkt); 收盘平多:tSELL(HOLDING>0,0,mkt); end
|
-- 作者:FJ6008
-- 发布时间:2015/2/25 16:23:48
--
老师:不是这样吗
if c>zz and c>qs then begin Tsellshort(tholding<0,SS,mkt),orderqueue; Tbuy(tholding=0,SS,lmt,o),orderqueue,; end if c<zz and c<qs then begin Tsell(tholding>0,SS,MARKET),orderqueue; Tbuyshort(tholding=0,SS,lmt,o),orderqueue; end
|
-- 作者:FJ6008
-- 发布时间:2015/2/25 16:25:19
--
我看教程是这样写的
|
-- 作者:FJ6008
-- 发布时间:2015/2/25 16:31:01
--
搞不明白了,只有请教了
|
-- 作者:jinzhe
-- 发布时间:2015/2/25 16:38:44
--
对,buy之前要加t写成tbuy,我漏改了不好意思
|
-- 作者:FJ6008
-- 发布时间:2015/2/25 17:07:11
--
谢谢!我的程序模型,在老师的支撑下已经很好了,接下来就是搞成后台模型了
此主题相关图片如下:未命名.jpg
![dvubb 图片点击可在新窗口打开查看](UploadFile/2015-2/20152251771059053.jpg)
|