以文本方式查看主题
- 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp)
-- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4)
---- 开平仓信号出现有闪动 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=60822)
|
-- 作者:qaz88
-- 发布时间:2014/1/9 22:29:37
-- 开平仓信号出现有闪动
如下代码开平仓信号出现有闪动.怎样改为不闪.耍求用固定轮模式下单.
IF ((((HOLDING > 0) AND COND111) AND (TIME >= TRADEBEGIN)) AND (TIME <= LASTTRADE)) THEN BEGIN DTFS1:=SELL(1,LOTS,LIMITR,(MIN(OPEN,(MYAVGENTERPRICE - FAILSAVESTOPLOSS)) - (SPLITRATE * MINDIFF)),1); DTFS2:=BUYSHORT(1,LOTS,LIMITR,(MIN(OPEN,(MYAVGENTERPRICE - FAILSAVESTOPLOSS)) - (SPLITRATE * MINDIFF)),1); END ELSE BEGIN IF ((((HOLDING < 0) AND COND333) AND (TIME >= TRADEBEGIN)) AND (TIME <= LASTTRADE)) THEN BEGIN KTFS1:=SELLSHORT(1,LOTS,LIMITR,(MAX(OPEN,(MYAVGENTERPRICE + FAILSAVESTOPLOSS)) + (SPLITRATE * MINDIFF)),1); KTFS2:=BUY(1,LOTS,LIMITR,(MAX(OPEN,(MYAVGENTERPRICE + FAILSAVESTOPLOSS)) + (SPLITRATE * MINDIFF)),1); END
|
-- 作者:jinzhe
-- 发布时间:2014/1/10 8:50:05
--
IF ref(((((HOLDING > 0) AND COND111) AND (TIME >= TRADEBEGIN)) AND (TIME <= LASTTRADE)),1) THEN BEGIN DTFS1:=SELL(1,LOTS,LIMITR,(MIN(OPEN,(MYAVGENTERPRICE - FAILSAVESTOPLOSS)) - (SPLITRATE * MINDIFF)),1); DTFS2:=BUYSHORT(1,LOTS,LIMITR,(MIN(OPEN,(MYAVGENTERPRICE - FAILSAVESTOPLOSS)) - (SPLITRATE * MINDIFF)),1); END ELSE BEGIN IF ref(((((HOLDING < 0) AND COND333) AND (TIME >= TRADEBEGIN)) AND (TIME <= LASTTRADE)),1) THEN BEGIN KTFS1:=SELLSHORT(1,LOTS,LIMITR,(MAX(OPEN,(MYAVGENTERPRICE + FAILSAVESTOPLOSS)) + (SPLITRATE * MINDIFF)),1); KTFS2:=BUY(1,LOTS,LIMITR,(MAX(OPEN,(MYAVGENTERPRICE + FAILSAVESTOPLOSS)) + (SPLITRATE * MINDIFF)),1); END
|
-- 作者:qaz88
-- 发布时间:2014/1/13 10:34:08
--
增加了REF出现错误.请指教!
|
-- 作者:jinzhe
-- 发布时间:2014/1/13 10:39:26
--
什么错误?
|
-- 作者:qaz88
-- 发布时间:2014/1/13 10:42:59
--
增加了REF出现错误.请指教!
此主题相关图片如下:7777.jpg
![dvubb 按此在新窗口浏览图片](UploadFile/2014-1/201411310425343367.jpg)
|
|
-- 作者:jinzhe
-- 发布时间:2014/1/13 10:54:27
--
ref(HOLDING > 0 AND COND111 AND TIME >= TRADEBEGIN AND TIME <= LASTTRADE,1)
ref(HOLDING < 0 AND COND333 AND TIME >= TRADEBEGIN AND TIME <= LASTTRADE,1)
改成这样试试,如果还不对那么就不是这句ref 的问题,是在其他的ref上有问题
|
-- 作者:qaz88
-- 发布时间:2014/1/13 11:08:17
--
增加了
此主题相关图片如下:8888.jpg
![dvubb 图片点击可在新窗口打开查看](UploadFile/2014-1/20141131181482527.jpg) 出现错误.请指教!
|
-- 作者:jinzhe
-- 发布时间:2014/1/13 11:09:57
--
帖代码,你这个是想要干什么?
|
-- 作者:qaz88
-- 发布时间:2014/1/13 11:13:46
--
试了这个不行出错
此主题相关图片如下:8888.jpg
![dvubb 按此在新窗口浏览图片](UploadFile/2014-1/201411311134499045.jpg)
ref(HOLDING > 0 AND COND111 AND TIME >= TRADEBEGIN AND TIME <= LASTTRADE,1) ref(HOLDING < 0 AND COND333 AND TIME >= TRADEBEGIN AND TIME <= LASTTRADE,1) |
|
-- 作者:qaz88
-- 发布时间:2014/1/13 11:21:37
--
老师移动止损止盈怎写?要求浮动止损3个点
|