打算多少点止盈?
那就以开多为例
if holding>0 and hhv(h,enterbars+1)>enterprice+1 and l<=enterprice+1 then sell(1,0,market);
表示盘中有盈利, 在价格跌倒盈利一个点的情况下,止盈
请教能不能这样写?在第8根棒之后,当市场价格低于1个点时。平仓止盈。
if holding>0 and hhv(h,8)>enterprice and close-enterprice<=1 then sell(1,0,market);
那就是
if holding>0 and hhv(h,enterbars+1)>enterprice+1 and l<=enterprice+1 and enterbars>8 then sell(1,0,market);
大师请教一下,enterprice是一个常量,enterprice+1>=1成了一个变量,怎么理解?close-enterprice<=1 比较好理解一点。
按照高中的数学不等式的计算,
l<=enterprice+1 和l-enterprice<=1是一个意思
怎么就不能理解了
if holding>0 and hhv(h,enterbars+1)>enterprice+1 and l<=enterprice+1 and enterbars>8 then sell(1,0,market);是不是可以换成以下写法:
if holding>0 and hhv(h,enterbars+1)>enterprice+1 and close- enterprice<=1 and enterbars>8 then sell(1,0,market);