※ 引述《ssdog (ssdog)》之铭言:
: 请教一下~有人知道超过基本成本单后 每涨跌50点的加码语法如何写?
: 收盘低到成本就全平 我每次写都变成一直加码 然后一直平仓
: if condition1 then buy("base") 1 share next bar at market;
: if entryprice +50 > entryprice then buy ("add1")1 share next bar at market;
: if avgentryprice < c then sell all shares next bar at market;
: 是不是要设一个变量去控制?该怎么设啊?可以指导一下吗?
下面两列改一下试试
if C >= Entryprice+50 then buy ("add1") 1 share next bar at market;
if C <= Avgentryprice then sell all shares next bar at market;