第一个(图片那个)是 判段一个下影线,,,应该是这样写的,,, ref(open,1) - ref(low,1) > K and ref(close,1) - ref(open,1) < N , 意思是说,,开盘之后 开盘价 和最低价的差值 大于 K ,, 但是收盘价和开盘价的差值又小于 N ,,,则 判段为 一根长的 下影线,, K 的差值 肯定 大于 N 多头的话,,,应该 是 把第二个写为 ref(open,1) < N - ref(close,1) <N ,, 我 不知道 有没有判段上影线和下影线的 差值的函数,所以只能用土办法去判段了 第二个 分批 出场的话, 比如说,,,利润 大于 100点 标记为 K ,, 则平仓3 手,,利润大于 150点,标记为 N 则平仓 3 手,,,是这样的思路 |
1的顺序是: 01开10手,然后02加仓开1手
假如01和和02之间有信号出现导致10手平了,比如在下面红色箭头的地方01平了。
那么02还要不要开?
1.
if holding=10 and 你写的02加仓条件 then buy(1,1,thisclose);
if holding=11 and 你写的02平仓条件 then sell(1,1,thisclose);
if holding>0 and 你写的01平仓 条件 then sell(1,0,thisclose);
2.
if holding=10 and h-enterprice>100 and h-enterprice<=150 then sell(1,3,thisclose);
if holding=7 and h-enterprice>150 and h-enterprice<=200 then sell(1,3,thieslose);
if holding=4 and h-enterprice>200 then sell(1,0,thisclose);