Skip to content

PlaceLimitOrder Method (19)

PlaceLimitOrder (1 of 19)

Summary

Place a Limit Order

Signature

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

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

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

PlaceLimitOrder (2 of 19)

Summary

Place a Limit Order

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, 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
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.
     }
}

PlaceLimitOrder (3 of 19)

Summary

Place a Limit Order

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, 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
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.
     }
}

PlaceLimitOrder (4 of 19)

Summary

Place a Limit Order

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, 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
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime? Order expiry 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.
     }
}

PlaceLimitOrder (5 of 19)

Summary

Place a Limit Order

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, 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
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime? Order expiry 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.
     }
}

PlaceLimitOrder (6 of 19)

Summary

Place a Limit Order

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, 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
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime? Order expiry 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.
     }
}

PlaceLimitOrder (7 of 19)

Summary

Place a Limit Order

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, string symbolName, double volume, double targetPrice, 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
label string Label representing the order
stopLossPips double? Stop loss in pips
takeProfitPips double? Take profit in pips
expiration DateTime? Order expiry 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.
     }
}

PlaceLimitOrder (8 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume long Volume of trade
targetPrice double Target price (or better) at which the order is filled

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

PlaceLimitOrder (9 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

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

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume of trade
targetPrice double Target price (or better) at which the order is filled

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

PlaceLimitOrder (10 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

1
public TradeResult PlaceLimitOrder(TradeType tradeType, Symbol symbol, long volume, double targetPrice, string label)

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume long Volume of trade
targetPrice double Target price (or better) at which the order is filled
label string Label that represents 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.
     }
}

PlaceLimitOrder (11 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

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

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume of trade
targetPrice double Target price (or better) at which the order is filled
label string Label that represents 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.
     }
}

PlaceLimitOrder (12 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

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

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume long Volume of trade
targetPrice double Target price (or better) at which the order is filled
label string Label that represents the order
stopLossPips double? Stop loss in pips from target price
takeProfitPips double? Take profit in pips 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.
     }
}

PlaceLimitOrder (13 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

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

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume double Volume of trade
targetPrice double Target price (or better) at which the order is filled
label string Label that represents the order
stopLossPips double? Stop loss in pips from target price
takeProfitPips double? Take profit in pips 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.
     }
}

PlaceLimitOrder (14 of 19)

Summary

Place limit order in asynchronous execution mode

Signature

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

Parameters

Name Type Description
tradeType TradeType Direction of trade
symbol Symbol
volume long Volume of trade
targetPrice double Target price (or better) at which the order is filled
label string Label that represents the order
stopLossPips double? Stop loss in pips from target price
takeProfitPips double? Take profit in pips from target price
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.
     }
}

PlaceLimitOrder (15 of 19)

Signature

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

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?

Return Value

TradeResult

Declaring Type

cAlgo.API.Robot

PlaceLimitOrder (16 of 19)

Signature

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

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume long
targetPrice double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string

Return Value

TradeResult

Declaring Type

cAlgo.API.Robot

PlaceLimitOrder (17 of 19)

Signature

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

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string

Return Value

TradeResult

Declaring Type

cAlgo.API.Robot

PlaceLimitOrder (18 of 19)

Signature

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

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
hasTrailingStop bool

Return Value

TradeResult

Declaring Type

cAlgo.API.Robot

PlaceLimitOrder (19 of 19)

Signature

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

Parameters

Name Type Description
tradeType TradeType
symbol Symbol
volume double
targetPrice double
label string
stopLossPips double?
takeProfitPips double?
expiration DateTime?
comment string
hasTrailingStop bool
stopLossTriggerMethod StopTriggerMethod?

Return Value

TradeResult

Declaring Type

cAlgo.API.Robot


Last update: June 26, 2022

Comments