以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 当日停止交易 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=53580) |
-- 作者:shark009 -- 发布时间:2013/7/3 12:11:10 -- 当日停止交易 日内交易,请问如何编写 按照图表交易测算亏损20点后,停止交易。 即按照图表给出的买卖价格,比如给出 5次信号,按此价格测算,亏了20点就不再买入。 不是按照实际成交价来测算。 |
-- 作者:jinzhe -- 发布时间:2013/7/3 13:10:44 -- if c-enterprice>20*mindiff or enterprice>20*mindiff then exit; |
-- 作者:shark009 -- 发布时间:2013/7/3 13:24:02 -- 我说的是多次交易,比如5次。按照图表给出的价格计算。 1 亏8点 2 赚3点 3亏8点 4 赚1点 5 亏10点 共计盈亏 -8+3-8+1-10=-22 亏损超过20,此时停止交易。 |
-- 作者:shark009 -- 发布时间:2013/7/3 13:26:28 -- 请回复,你给的答案无法让人满意。如果不能做也可以直接答复无法支持,但不要给这样的答案。 |
-- 作者:jinzhe -- 发布时间:2013/7/3 13:55:41 -- variable:n=0,yingli=0; if 平仓条件 and 持仓判断 then begin 平仓语句; n:=n+1; yingli:=yingli+c-enterprice; end
if n=5 and yingi<=-20*mindiff then exit;
n=5来表示累计5级 |