Robot.ModifyPendingOrder
method · Robot · cAlgo.API
Modify a Pending Order
Overloads
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
Returns TradeResult — Trade Result
Examples
Example 1
ModifyPendingOrder(PendingOrders[0], Symbol.Ask);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)
Example 2
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
Returns TradeResult — Trade Result
Examples
Example 1
ModifyPendingOrder(PendingOrders[0], Symbol.Ask);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask)
Example 2
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, long volume)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: int) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | long | int | New volume in units for the order |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | long | int | New volume in units for the order |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | long | int | New volume in units for the order |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | long | int | New volume in units for the order |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, long volume, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: int, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | long | int | New volume in units for the order |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | double? | float | None | New Stop loss |
takeProfit | double? | float | None | New Take profit |
protectionType | ProtectionType? | ProtectionType | None | New Protection type |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLimitRangePips | double? | float | None | Maximum distance for order execution from target price |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLimitRangePips | double? | float | None | Maximum distance for order execution from target price |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | RelativeStopLossProtection | RelativeStopLossProtection | Relative Stop loss |
takeProfits | RelativeTakeProfitProtections | RelativeTakeProfitProtections | Relative Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLimitRangePips | double? | float | None | Maximum distance for order execution from target price |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, StopLossBreakEven(15, 3))
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLimitRangePips | double? | float | None | Maximum distance for order execution from target price |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5);
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5)
ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven)
Modify a Pending Order
public TradeResult ModifyPendingOrder(PendingOrder pendingOrder, double targetPrice, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, StopLossBreakEven stopLossBreakEven)
api.ModifyPendingOrder(pendingOrder: PendingOrder, targetPrice: float, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expirationTime: DateTime | None, volume: float, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod | None, stopLimitRangePips: float | None, stopLossBreakEven: StopLossBreakEven) -> TradeResult
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
pendingOrder | PendingOrder | PendingOrder | Pending Order which is affected |
targetPrice | double | float | New target price |
stopLoss | AbsoluteStopLossProtection | AbsoluteStopLossProtection | Absolute Stop loss |
takeProfits | AbsoluteTakeProfitProtections | AbsoluteTakeProfitProtections | Absolute Take profits |
expirationTime | DateTime? | DateTime | None | New order expiration time |
volume | double | float | New volume in units for the order |
hasTrailingStop | bool | bool | Enable/disable TrailingStop for position |
stopLossTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Trigger method for position's StopLoss |
stopOrderTriggerMethod | StopTriggerMethod? | StopTriggerMethod | None | Determines how pending order will be triggered in case it is a StopOrder |
stopLimitRangePips | double? | float | None | Maximum distance for order execution from target price |
stopLossBreakEven | StopLossBreakEven | StopLossBreakEven | Break-even for position's StopLoss |
Returns TradeResult — Trade Result
Examples
ModifyPendingOrder(PendingOrders[0], Symbol.Ask, new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), 10000, true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, new StopLossBreakEven(15, 3));
api.ModifyPendingOrder(api.PendingOrders[0], api.Symbol.Ask, AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), 10000, True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, 5, StopLossBreakEven(15, 3))