how can i detect if a position close by stoploss or by takeprofits?
08 Apr 2014, 20:09
that the question:
how can i detect if a position close by stoploss or by takeprofits?
i make this, but i not work so fine... any help?
private void OnPositionsClosed(PositionClosedEventArgs args)
{
var closedPositionInfo = args.Position;
if (lastposId == closedPositionInfo.Id) {
if ((closedPositionInfo.StopLoss == Symbol.Bid) || (closedPositionInfo.StopLoss == Symbol.Ask)){
Print ("last position closed by stoploss");
} else if ((closedPositionInfo.TakeProfit == Symbol.Bid) || (closedPositionInfo.TakeProfit == Symbol.Ask)){
Print ("last position closed by takeprofits");
} else {
Print ("we do not know why...");
}
}
closedPositionInfo = null;
}
thanks for your help!!!

Spotware
09 Apr 2014, 11:07
It is not possible at the moment. You can post your feature request to vote.spotware.com.
@Spotware