以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  止损问题  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=75108)

--  作者:huangwenj197
--  发布时间:2015/1/28 16:28:02
--  止损问题

老师好,下面是论坛里的帖子,其中:=(c-enterprice)/enterprice*100;100是什么意思啊;求指导。

 

win:=0;
win2:=0;

if holding > 0 and enterbars > 0 then
begin
 win:=(c-enterprice)/enterprice*100; //记录最大盈利
 if win > maxprofit then
  maxprofit:=win;
 
 win2:=(maxprofit-win)/maxprofit*100; //最大盈利后的回调幅度
end


--  作者:pyd
--  发布时间:2015/1/28 16:32:40
--  

就是盈利比上开仓价再乘以100,楼上这种写法有点麻烦,您要实现什么?直接说出您的需求。

[此贴子已经被作者于2015/1/28 16:33:50编辑过]

--  作者:huangwenj197
--  发布时间:2015/1/28 16:46:24
--  

谢谢老师!股指期货,一分钟周期

 

我想开仓后,盈利大于10点以上后,执行回调盈利的60%以下平仓;

 

谢谢指导;


--  作者:jinzhe
--  发布时间:2015/1/28 17:07:49
--  

多头:holding>0 and hhv(h,enterbars+1)-enterprice>10 and (hhv(h,enterbars+1)-c)/hhv(h,enterbars+1)>0.6

空头:holding<0 and enterprice-llv(l,enterbars+1)>10 and (c-llv(l,enterbars+1))/c>0.6


--  作者:huangwenj197
--  发布时间:2015/1/28 19:57:48
--  

谢谢老师!