Describe a new feature or changes to a current feature that would improve your trading.

detect if a position close by stoploss or by takeprofits

Let us now when a position was close by takeprofits for instantanealy open another position with same tradetype

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;
}

13 votes
Sign in
(thinking…)
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

paulo lira shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base