Skip to content

PlaceStopLimitOrder Method (16)

PlaceStopLimitOrder (1 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (2 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (3 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (4 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)

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
expiration DateTime? Order expiry date and time

Return Value

TradeResult

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

PlaceStopLimitOrder (5 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)

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
expiration DateTime? Order expiry date and time
comment string Order comment

Return Value

TradeResult

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

PlaceStopLimitOrder (6 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)

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
expiration DateTime? Order expiry date and time
comment string Order comment
hasTrailingStop bool Enable/disable TrailingStop for position

Return Value

TradeResult

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

PlaceStopLimitOrder (7 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)

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
expiration DateTime? Order expiry date and time
comment string Order comment
hasTrailingStop bool Enable/disable TrailingStop for position
stopLossTriggerMethod StopTriggerMethod? Trigger method for position's StopLoss

Return Value

TradeResult

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

PlaceStopLimitOrder (8 of 16)

Summary

Place a Stop Limit Order

Signature

1
public TradeResult PlaceStopLimitOrder(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)

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
expiration DateTime? Order expiry date and time
comment string Order comment
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 StopLimitOrder

Return Value

TradeResult

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

PlaceStopLimitOrder (9 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (10 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (11 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (12 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (13 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment)

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

Return Value

TradeResult

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

PlaceStopLimitOrder (14 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop)

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 Enable/disable TrailingStop for position

Return Value

TradeResult

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

PlaceStopLimitOrder (15 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(TradeType tradeType, Symbol symbol, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLossPips, double? takeProfitPips, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod)

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 Enable/disable TrailingStop for position
stopLossTriggerMethod StopTriggerMethod? Trigger method for position's StopLoss

Return Value

TradeResult

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

PlaceStopLimitOrder (16 of 16)

Summary

Place Stop Limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceStopLimitOrder(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)

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 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 StopLimitOrder

Return Value

TradeResult

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

Last update: March 30, 2023