以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://www.weistock.com/bbs/list.asp?boardid=4) ---- 连亏加仓 (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=67366) |
-- 作者:pyd -- 发布时间:2014/7/14 15:52:02 -- 连亏加仓 请教:如果平仓连亏3次,下次开仓加1手,连亏四次,下次开仓再加1手,连亏五次,下次开仓再加1手,
连亏六次,下次开仓再加1手,这时候开仓手数是5手,之后不再加仓。
|
-- 作者:jinzhe -- 发布时间:2014/7/14 15:54:51 -- 初始开仓手数是1手吗? |
-- 作者:good -- 发布时间:2014/7/15 13:11:15 -- 请教:如果平仓连亏3次,下次开仓加1手,连亏四次,下次开仓再加1手,连亏五次,下次开仓再加1手,
连亏六次,下次开仓再加1手,这时候开仓手数是5手,之后不再加仓。初始开仓是1手。 |
-- 作者:good -- 发布时间:2014/7/15 13:12:08 -- 请教各位帮忙解决一下这个问题, |
-- 作者:jinzhe -- 发布时间:2014/7/15 13:18:00 -- variable:n=0;//记录连亏次数 variable:shoushu=1;//下单手数 if 平多条件 and 持仓判断 then begin sell(.....); if numprofit(1)>0 then n:=0; if numprofit(1)<0 then n:=n+1; end
if 平空条件 and 持仓判断 then begin sellshort(......); if numprofit(1)>0 then n:=0; if numprofit(1)<0 then n:=n+1; end
if n=3 then 手数:=2; if n=4 then 手数:=3; if n=5 then 手数:=4; if n=6 then 手数:=5; |