Skip to content

ModifyPendingOrderAsync Method (10)

ModifyPendingOrderAsync (1 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (2 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (3 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (4 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, long volume, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
volume long New volume in units for the order
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (5 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
volume double New volume in units for the order
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (6 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
volume double New volume in units for the order
hasTrailingStop bool Enable/disable TrailingStop for position
stopLossTriggerMethod StopTriggerMethod? Trigger method for position's StopLoss
stopOrderTriggerMethod StopTriggerMethod? Determines how pending order will be triggered in case it's a StopOrder
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (7 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
volume double New volume in units for the order
hasTrailingStop bool Enable/disable TrailingStop for position
stopLossTriggerMethod StopTriggerMethod? Trigger method for position's StopLoss
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (8 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
volume double New volume in units for the order
hasTrailingStop bool Enable/disable TrailingStop for position
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (9 of 10)

Summary

Modify a Pending Order in asynchronous execution mode

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, double volume, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod? stopOrderTriggerMethod, double? stopLimitRangePips, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder Pending Order to modify
targetPrice double New target price at which the order becomes market order
stopLossPips double? New stop loss
takeProfitPips double? New take profit
expirationTime DateTime? New expiry date and time
volume double New volume in units for the order
hasTrailingStop bool Enable/disable TrailingStop for position
stopLossTriggerMethod StopTriggerMethod? Trigger method for position's StopLoss
stopOrderTriggerMethod StopTriggerMethod? Determines how pending order will be triggered in case it's a StopOrder
stopLimitRangePips double? Maximum distance for order execution from target price
callback Action Method that is called when order is modified

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 namespace cAlgo.Robots
 {
 [Robot]
 public class myCBot : Robot
 {
     protected override void OnStart()
     {
         //This method is called when the cBot is being started, once.
     }
     protected override void OnBar()
     {
         // Called on each incoming Bar.
     }
     protected override void OnTick()
     {
         // Called on each incoming tick.
     }
     protected override void OnError(Error error)
     {
         Print("There has been an Error");
     }
     protected override void OnStop()
     {
         //This method is called when the cBot is being stoped.
     }
}

ModifyPendingOrderAsync (10 of 10)

Signature

1
public TradeOperation ModifyPendingOrderAsync(PendingOrder pendingOrder, long volume, double targetPrice, double? stopLossPips, double? takeProfitPips, DateTime? expirationTime, Action<TradeResult> callback)

Parameters

Name Type Description
pendingOrder PendingOrder
volume long
targetPrice double
stopLossPips double?
takeProfitPips double?
expirationTime DateTime?
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot


Last update: June 26, 2022

Comments