if (position.Label == "MyRobot")
{
Print("on a trouve une position du robot " + position.TradeType + " time =" + position.EntryTime + "price = " + position.EntryPrice + "label" + position.Label);
_position = position;
break;
}
}
Then, your question is may about how to distinguish manually created position from the positions created by the robot. Can do this simply by libelling the robot created postion like this :
var request = new MarketOrderRequest(TradeType.Buy, Volume)
{
Label = "MyRobot"
};
Trade.Send(request);
illicoIt
25 Nov 2013, 14:01
Handling of manually sending orders
Yes. You can loop over the account positions.
foreach (var position in Account.Positions)
{
if (position.Label == "MyRobot")
{
Print("on a trouve une position du robot " + position.TradeType + " time =" + position.EntryTime + "price = " + position.EntryPrice + "label" + position.Label);
_position = position;
break;
}
}
Then, your question is may about how to distinguish manually created position from the positions created by the robot. Can do this simply by libelling the robot created postion like this :
var request = new MarketOrderRequest(TradeType.Buy, Volume)
{
Label = "MyRobot"
};
Trade.Send(request);
@illicoIt