ModifyPositionAsync


Summary

Modify Position in asynchronous execution mode

Syntax

public TradeOperation ModifyPositionAsync(Position position, double volume, [optional] Action callback)
public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, [optional] Action callback)
public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, [optional] Action callback)
public TradeOperation ModifyPositionAsync(Position position, double? stopLoss, double? takeProfit, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, [optional] Action callback)

Parameters

NameDescription

Example 1

var position = Positions.Find("myLabel", Symbol, TradeType.Buy);
if (position != null)
{
    ModifyPositionAsync(position, 20000);
}