老师好,下面是论坛里的帖子,其中:=(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
就是盈利比上开仓价再乘以100,楼上这种写法有点麻烦,您要实现什么?直接说出您的需求。
谢谢老师!股指期货,一分钟周期
我想开仓后,盈利大于10点以上后,执行回调盈利的60%以下平仓;
谢谢指导;
多头: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
谢谢老师!