以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- [求助] (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=139842) |
-- 作者:zxlwrz123 -- 发布时间:2016/9/21 10:56:15 -- [求助] if c>enterprice*(1+x) and holding>0 then sell(1,0,marketr);//多头止盈 if c<enterpric *(1-x1) and holding<0 then sell(1,0,marketr);//止损多头 if c<enterprice*(1+x) and holding<0 then sellshort(1,0,marketr);///空头止盈 if c>enterprice*(1-x1) and holding>0 then sellshort(1,0,marketr);//止损空头 ![]() 能不能在止盈止损后,再不交易,直到收盘平仓? |
-- 作者:jinzhe -- 发布时间:2016/9/21 11:13:36 -- variable:bj=0;
if c>enterprice*(1+x) and holding>0 then begin
bj:=1;
sell(1,0,marketr);//多头止盈
end
if c<enterpric *(1-x1) and holding<0 then begin
bj:=1;
sell(1,0,marketr);//止损多头
end
if c<enterprice*(1+x) and holding<0 then begin
bj:=1;
sellshort(1,0,marketr);///空头止盈
end
if c>enterprice*(1-x1) and holding>0 then begin
bj:=1;
sellshort(1,0,marketr);//止损空头
end
if time=closetime(0) then bj:=0;
|
-- 作者:zxlwrz123 -- 发布时间:2016/9/21 13:40:22 -- 谢谢 |
-- 作者:netlife88 -- 发布时间:2016/9/21 15:49:11 -- 你这个根据啥 写的 可以看下源码吗 |