日内交易,请问如何编写 按照图表交易测算亏损20点后,停止交易。
即按照图表给出的买卖价格,比如给出 5次信号,按此价格测算,亏了20点就不再买入。
不是按照实际成交价来测算。
if c-enterprice>20*mindiff or enterprice>20*mindiff then exit;
我说的是多次交易,比如5次。按照图表给出的价格计算。
1 亏8点
2 赚3点
3亏8点
4 赚1点
5 亏10点
共计盈亏 -8+3-8+1-10=-22
亏损超过20,此时停止交易。
请回复,你给的答案无法让人满意。如果不能做也可以直接答复无法支持,但不要给这样的答案。
variable:n=0,yingli=0;
if 平仓条件 and 持仓判断 then begin
平仓语句;
n:=n+1;
yingli:=yingli+c-enterprice;
end
if n=5 and yingi<=-20*mindiff then exit;
n=5来表示累计5级