我使用了不同类型的止损,并希望收到通知 ( SendNotification()
) 关于在交易退出时触发了哪种止损。
假设我通过...进行交易
request.action = TRADE_ACTION_DEAL;
request.symbol = pSymbol;
request.type = pType;
request.sl = pStop;
request.tp = pProfit;
request.comment = pComment;
request.volume = pVolume;
request.price = SymbolInfoDouble(pSymbol,SYMBOL_ASK);
request.price = SymbolInfoDouble(pSymbol,SYMBOL_BID)
OrderSend(request,result);
我现在想request.comment
改变最后一个止损点,如下所示:
request.action = TRADE_ACTION_SLTP;
request.symbol = pSymbol;
request.sl = pStop;
request.tp = pProfit;
request.comment = "Fixed SL";
PositionSelect(_Symbol);
request.order = PositionGetInteger(POSITION_IDENTIFIER);
OrderSend(request,result);
不幸的是,第二个代码块并没有改变第一个代码块request.comment = pComment;
(而是新的注释是[sl 1.19724]
)。
是否可以通过更改评论TRADE_ACTION_SLTP
?我究竟做错了什么?
谢谢!