Skip to content

PlaceStopLimitOrderAsync Method (16)

PlaceStopLimitOrderAsync (1 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (2 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string Label representing the order
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (3 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime?
comment string
hasTrailingStop bool
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (4 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime? Order expiry date and time
comment string
hasTrailingStop bool
stopLossTriggerMethod StopTriggerMethod?
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (5 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime? Order expiry date and time
comment string Order comment
hasTrailingStop bool
stopLossTriggerMethod StopTriggerMethod?
stopOrderTriggerMethod StopTriggerMethod
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (6 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbolName string Symbol name of trade
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (7 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbolName string Symbol name of trade
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string Label representing the order
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (8 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbolName string Symbol name of trade
volume double Volume (in units) of trade
targetPrice double Price (or better) at which order is filled
stopLimitRangePips double Maximum distance for order execution from target price
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
callback Action Action when order is placed

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

PlaceStopLimitOrderAsync (9 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbolName string
volume double
targetPrice double
stopLimitRangePips double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (10 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbolName string
volume double
targetPrice double
stopLimitRangePips double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (11 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbolName string
volume double
targetPrice double
stopLimitRangePips double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
hasTrailingStop bool
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (12 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbolName string
volume double
targetPrice double
stopLimitRangePips double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
hasTrailingStop bool
stopLossTriggerMethod StopTriggerMethod?
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (13 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbolName string
volume double
targetPrice double
stopLimitRangePips double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
hasTrailingStop bool
stopLossTriggerMethod StopTriggerMethod?
stopOrderTriggerMethod StopTriggerMethod
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (14 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
stopLimitRangePips double
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (15 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
stopLimitRangePips double
label string
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot

PlaceStopLimitOrderAsync (16 of 16)

Signature

1
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, Action<TradeResult> callback)

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
stopLimitRangePips double
label string
stopLossPips double?
takeProfitPips double?
callback Action

Return Value

TradeOperation

Declaring Type

cAlgo.API.Robot


Last update: November 25, 2022

Comments