以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 日内交易如何写? (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=94467) |
-- 作者:huoyang14895 -- 发布时间:2016/3/8 10:55:48 -- 日内交易如何写? 请问:(图表交易)1.日内交易如何写? 2.日内交易亏损,下一手加一手单,如何写。 谢
|
-- 作者:pyd -- 发布时间:2016/3/8 10:59:38 -- 1.日内交易是当日平仓的意思的吗?那么处理办法是: if time0>=timetot0(closetime(0))-60*5 then begin sell(1,0,marketr); sellshort(1,0,marketr); end
即收盘前5分钟平仓 需要另外的在开仓条件里面加上: time0<timetot0(closetime(0))-60*5
2 variable:ss=1;//定义下单数量,即开仓手数写ss if holding>0 and 平多条件 then begin sell(1,0,marketr); if numprofit(1)<=0 then ss:=ss+1; end
if holding<0 and 平空条件 then begin sellshort(1,0,marketr); if numprofit(1)<=0 then ss:=ss+1; end |
-- 作者:huoyang14895 -- 发布时间:2016/3/8 13:06:21 -- 谢 |