请高手用免费版帮忙编写公式:
多头开仓价2000,设置止损点差5,止赢点差20,追踪点差3
注:系统的默认保底止赢损失是2个价位。
(1)价格跌至1990,自动止损;(2000 - 5 * 2 = 1990)
(2)价格上涨至最高价开始回撤,回撤100点 ,自动止赢;(2000+20*2=2040; 2000+20*2+3*2=2046)
仅供参考
variable:kaiduo=0;
if c>=2000 then
begin
sellshort(holding<0,0,market);
buy(holding=0,1,market);
sell(holding>0,0,limit,1990);//止损
end
//止盈
if holding>0 then
begin
kaiduo:=if(kaiduo<c,c,kaiduo);
if kaiduo-c<=100*mindiff then sell(holding>0,0,limit,2040);
end